Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Dave1mo1
Helper III
Helper III

Year Over Year Change in Moving Average

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?

 

Booked - YoY Unit MA =
calculate(
divide (
[Booked - Unit MA], [Booked - PY Unit MA], 0)
-
1)
2 REPLIES 2
Anonymous
Not applicable

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.

SachinNandanwar
Super User
Super User

VAR MostRecentDate = MAX('Table'[Date])

and then filter inside the CALCULATE for MostRecentDate



Regards,
Sachin
Check out my Blog

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.