Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I would like a measure that will select the the [Target -21/22] value based on the last value in the [21/22 - YTD] column.
Can I get help with DAX that would acheiev this?
Solved! Go to Solution.
Ha yes, indeed
what about this approach instead :
Measure =
VAR _Lastdate =
CALCULATE(
MAX( YourTable[Date] ),
ALL( YourTable[Date], YourTable[Month] ),
YourTable[21/22 - YTD] > 0
)
RETURN
CALCULATE(
MAX( YourTable[Target - 21/22] ),
YourTable[Date] = _LastDate
)
Hello @AThom
Can you try this :
Measure =
CALCULATE(
MAX( YourTable[Target - 21/22] ),
TOPN(
1,
VALUES( YourTable[Date] ),
Table[Date]
)
)
Hi,
That doesn't work. I am trying to get a measure that gets the corresponding [Target -21/22] value based on the MAX or most recent [21/22 - YTD] value.
Ha yes, indeed
what about this approach instead :
Measure =
VAR _Lastdate =
CALCULATE(
MAX( YourTable[Date] ),
ALL( YourTable[Date], YourTable[Month] ),
YourTable[21/22 - YTD] > 0
)
RETURN
CALCULATE(
MAX( YourTable[Target - 21/22] ),
YourTable[Date] = _LastDate
)
Thanks a lot, that worked
User | Count |
---|---|
101 | |
90 | |
80 | |
71 | |
69 |
User | Count |
---|---|
114 | |
97 | |
97 | |
73 | |
72 |