Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi
I am trying to get the previous year in YYYY format based on the last date in rolling stock table.
I have managed to get there but it has taken me 3 measures. Is there a way to amalgamte these into one measure or is there a better alternative?
Measure 1 gets the last date in table
Solved! Go to Solution.
@Pigbag1962 , change the second one like
LastYearDate =
var _1 = LASTDATE('Rolling Livestock Data'[Create dte])
return
date(year(_1) -1, month(_1), day(_1))
Thank you for that, gives me more insight as to how to use DAX.
@Pigbag1962 , change the second one like
LastYearDate =
var _1 = LASTDATE('Rolling Livestock Data'[Create dte])
return
date(year(_1) -1, month(_1), day(_1))
User | Count |
---|---|
93 | |
85 | |
76 | |
66 | |
62 |
User | Count |
---|---|
112 | |
97 | |
95 | |
64 | |
58 |