Forum Discussion
Graphing two Quick Measures
- 6 years ago
Hi MattGlover ,
If you just want the data in the line graph to display correctly, you can try creating the following measure instead (1.3) Total Revenues per Capita YoY%:
mearsure = IF ( ISFILTERED ( 'Master (2dot0)'[LongYear] ), ERROR ( "Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column." ), VAR __PREV_YEAR = CALCULATE ( 'Master (2dot0)'[Total Revenues per Capita], FILTER ( 'Master (2dot0)', 'Master (2dot0)'[LongYear].[Year] = 2017 ) ) VAR __THIS_YEAR = CALCULATE ( 'Master (2dot0)'[Total Revenues per Capita], FILTER ( 'Master (2dot0)', 'Master (2dot0)'[LongYear].[Year] = 2018 ) ) RETURN DIVIDE ( __THIS_YEAR - __PREV_YEAR, __PREV_YEAR )Best Regards,
Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I appreciate the reply. I looked at the two changes you mentioned and can replicate the results. However, 'Jurisdiction' is a required field as a Shared Axis.
Is there a way to accomplish this? I tried creating an additional measure that simply multiplies the YoY% value by two to counter the NULL values for 2017, but it's not accurate enough.
Hi MattGlover ,
If you just want the data in the line graph to display correctly, you can try creating the following measure instead (1.3) Total Revenues per Capita YoY%:
mearsure =
IF (
ISFILTERED ( 'Master (2dot0)'[LongYear] ),
ERROR ( "Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column." ),
VAR __PREV_YEAR =
CALCULATE (
'Master (2dot0)'[Total Revenues per Capita],
FILTER ( 'Master (2dot0)', 'Master (2dot0)'[LongYear].[Year] = 2017 )
)
VAR __THIS_YEAR =
CALCULATE (
'Master (2dot0)'[Total Revenues per Capita],
FILTER ( 'Master (2dot0)', 'Master (2dot0)'[LongYear].[Year] = 2018 )
)
RETURN
DIVIDE ( __THIS_YEAR - __PREV_YEAR, __PREV_YEAR )Best Regards,
Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- MattGlover6 years agoNew Member
Thank you so much! I appreciate all of the help.