RE: Can’t seem to create a line chart with date measure field
-
RE: Can’t seem to create a line chart with date measure field
Can’t seem to create a line chart with date measure fieldFollow
Bruce Ferguson
Bruce FergusonSep 20, 2022 12:17 PM
I am trying to create a line chart visual with status date on the X axis and status number on the Y axis …
1. Can’t seem to create a line chart with date measure fieldBronze Contributor
Bruce Ferguson
Posted Sep 20, 2022 12:17 PM | view attached (2)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.
btfergie_1-1663347331269.png
Ć
1 / 22. RE: Can’t seem to create a line chart with date measure field
Bronze Contributor
James Watts
Posted Sep 22, 2022 02:47 AM
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
Bruce Ferguson
Posted Sep 22, 2022 06:46 PM
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
Adam Artur Boltryk
Posted Sep 23, 2022 01:04 PM
Hi Bruce,Put Date from DIM calendar on axis.
Use your measure as filter.Regards
——————————
Adam Artur Boltryk
Business Analyst
——————————
Sorry, there were no replies found.
The discussion ‘RE: Can’t seem to create a line chart with date measure field’ is closed to new replies.