Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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))
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 39 | |
| 37 | |
| 29 | |
| 24 |
| User | Count |
|---|---|
| 119 | |
| 100 | |
| 72 | |
| 69 | |
| 65 |