Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
 View Only
  • 1.  Can't seem to create a line chart with date measure field

    Bronze Contributor
    Posted 8 days ago

    I am trying to create a line chart visual with status date on the X axis and status number on the Y axis but can't use the measure index or date fields in the X axis.

     

    This is related to a process going through different stages with an estimated duration known for each stage.

    • First I select the process type I am interested in.  This gives me the duration at each stage. 
    • Then I convert the start date to a workday index with a LOOKUPVALUE on a date table so I can count only workdays.

                       

    Start WorkDayIndex Col = CALCULATE(lookupvalue('Calendar2 (EDWn)'[WorkDayIndex],'Calendar2 (EDWn)'[Calendar Date],FIRSTDATE(MoldQual_RCGL[ProcessStart])))

         

    • Adding the  Start WorkDay Index to the Completed Total duration, I get a Status WorkDayIndex measure.
    Status WorkDayIndex = [Start WorkDayIndex]+sum('Mold Qual Duration Categories'[Completed Total])
     
    • I then use the Status WorkDayIndex measure to Lookup a Date.
    ProjectedStatusDate = calculate(LOOKUPVALUE('Calendar2 (EDWn)'[Calendar Date],'Calendar2 (EDWn)'[WorkDayIndex],[Status WorkDayIndex]))
     

    This all works in a table but I cant seem to use the ProjectedStatusDate in a line chart visual.  I can't drop the field in the field box.

    • tion, I get a Status WorkDayIndex measure.
    Status WorkDayIndex = [Start WorkDayIndex]+sum('Mold Qual Duration Categories'[Completed Total])
     
    • I then use the Status WorkDayIndex measure to Lookup a Date.
    ProjectedStatusDate = calculate(LOOKUPVALUE('Calendar2 (EDWn)'[Calendar Date],'Calendar2 (EDWn)'[WorkDayIndex],[Status WorkDayIndex]))
     

    This all works in a table but I can't seem to use the ProjectedStatusDate in a line chart visual.  I can't drop the field in the field box.






  • 2.  RE: Can't seem to create a line chart with date measure field

    Bronze Contributor
    Posted 6 days ago
    You can't use measures on the X-Axis.  Measures need a context in which to be processed, and they get this from the value of the horizontal axis.  You need to either create calculated columns, do the processing as a data transform in M Query, or do the processing before the data reaches Power BI in the source.

    ------------------------------
    James Watts
    Business Intelligence Analyst
    ------------------------------



  • 3.  RE: Can't seem to create a line chart with date measure field

    Bronze Contributor
    Posted 5 days ago
    That makes sense.  However, I can get the date measure to work on the Y axis either.






  • 4.  RE: Can't seem to create a line chart with date measure field

    Posted 5 days ago
    Hi Bruce,

    Put Date from DIM calendar on axis.
    Use your measure as filter.

    Regards

    ------------------------------
    Adam Artur Boltryk
    Business Analyst
    ------------------------------