Forum Discussion
Measure as Page Level Filter
Hi ksan048,
To achieve your requirement, please use dax formula below:
LOS Worse than Last Month =
VAR LOS_Last_Month_Score =
CALCULATE ( AVERAGE ( Sheet1[LOS Score] ), DATEADD ( Sheet1[Date], -1, MONTH ) )
VAR LOS_Month_Score =
CALCULATE (
AVERAGE ( Sheet1[LOS Score] ),
DATEADD ( Sheet1[Date].[date], 1, MONTH )
)
RETURN
IF ( LOS_Last_Month_Score < LOS_Month_Score, "Y", "N" )
Regards,
Jimmy Tao
Thanks for replying. I gave it a go and it seemed to only return me 'N'.
I stuck all the measures in a table including the solution you provided which I have named the column as 'LOS worse' as shown below. (I have omitted the first column of IDs from the image).
I'm new to Power BI and need a bit of guidance!
Thanks a lot!
- wildmight20178 years agoAdvocate II
Were you able to figure out a solution? I'm trying to achieve something similar - and getting the same issue of repeating value. My suspicion is that you need to apply certain ALL() statements for it to work properly given granularity.
- ksan0488 years agoFrequent Visitor
wildmight2017 I hadn't manage to figure it out and ended up using Tableau instead as it accepted shape files that are of linestring types. I didn't need a workaround at all.......