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!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi,
I have a measure below that calculates the % change in a moving average, comparing the current year to the previous year. I have it on a map visual to show it by state, but it only works correctly if I have a visual-level filter for yesterday's date on the visual (our data is only current through yesterday).
How can I rewrite this measure to only show results for THE MOST RECENT date in my date table, which is also the date for my most recent transaction?
Hi @Dave1mo1 ,
Based on the description, try to use the following dax formula.
Booked - YoY Unit MA =
CALCULATE(
DIVIDE(
[Booked - Unit MA],
[Booked - PY Unit MA],
0
) - 1,
LASTDATE('DateTable'[Date])
)
LASTDATE function (DAX) - DAX | Microsoft Learn
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
VAR MostRecentDate = MAX('Table'[Date])
and then filter inside the CALCULATE for MostRecentDate
User | Count |
---|---|
10 | |
8 | |
5 | |
5 | |
4 |