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! Request now

Reply
jhauw74
Helper I
Helper I

Calculating YoY DAX

Hi Everyone - wishing you all to be well !!

I want to know how to calculate YoY based on this scenario:

jhauw74_0-1727753799564.png

The year on year % needs to be calculated based on:
1. FY 2023 performance which start on 1/07/2023 - this needs to be calculated from 1/07/2023 through to 27/09/2023

2. FY 2024 performance which start on 1/07/2024 - this needs to be calculated from 1/07/2024 through to 27/09/2024

I have used the DAX formula 'same period as last year' however is resulting the calculation is comparing FY 23 vs FY 24 period  in days ie. from 20/09/24 - 27/09/24 vs 20/09/23 - 27/09/23 as this is based on Week Ending Friday in the calendar table.

Thank you in advance for any assistance 🙂

1 ACCEPTED SOLUTION
jhauw74
Helper I
Helper I

Hi Everyone - thanking you all for sharing the ideas on how to solve this issue.

I am managed reconfigure the logic in the DAX by using the following:

YoY Growth FY =
VAR CurrentWeekEnd = MAX('BOM_DIM_Date'[Week_Ending_Date])
VAR CurrentFYStart = DATE(YEAR(CurrentWeekEnd) - IF(MONTH(CurrentWeekEnd) < 7, 1, 0), 7, 1)
VAR PreviousFYStart = DATE(YEAR(CurrentFYStart) - 1, 7, 1)
VAR CurrentFYValue = CALCULATE([FixedActivationsAll], 'BOM_DIM_Date'[Calendar_Date] >= CurrentFYStart, 'BOM_DIM_Date'[Calendar_Date] <= CurrentWeekEnd)
VAR PreviousFYValue = CALCULATE([FixedActivationsAll], 'BOM_DIM_Date'[Calendar_Date] >= PreviousFYStart, 'BOM_DIM_Date'[Calendar_Date] <= EDATE(CurrentWeekEnd, -12))
RETURN
DIVIDE(CurrentFYValue - PreviousFYValue, PreviousFYValue, 0)

Note:
BOM_DIM_Date - calendar table
FixedActivationsAll - my measure

View solution in original post

4 REPLIES 4
jhauw74
Helper I
Helper I

Hi Everyone - thanking you all for sharing the ideas on how to solve this issue.

I am managed reconfigure the logic in the DAX by using the following:

YoY Growth FY =
VAR CurrentWeekEnd = MAX('BOM_DIM_Date'[Week_Ending_Date])
VAR CurrentFYStart = DATE(YEAR(CurrentWeekEnd) - IF(MONTH(CurrentWeekEnd) < 7, 1, 0), 7, 1)
VAR PreviousFYStart = DATE(YEAR(CurrentFYStart) - 1, 7, 1)
VAR CurrentFYValue = CALCULATE([FixedActivationsAll], 'BOM_DIM_Date'[Calendar_Date] >= CurrentFYStart, 'BOM_DIM_Date'[Calendar_Date] <= CurrentWeekEnd)
VAR PreviousFYValue = CALCULATE([FixedActivationsAll], 'BOM_DIM_Date'[Calendar_Date] >= PreviousFYStart, 'BOM_DIM_Date'[Calendar_Date] <= EDATE(CurrentWeekEnd, -12))
RETURN
DIVIDE(CurrentFYValue - PreviousFYValue, PreviousFYValue, 0)

Note:
BOM_DIM_Date - calendar table
FixedActivationsAll - my measure
AsNa_92
Resolver II
Resolver II

Hi

 

There are some articles with same requirments .. try to see if you will find your answer there:

 

calculate YoY 

 

How to calculate YOY 

Anonymous
Not applicable

Hi, @jhauw74 

Thanks for audreygerred's reply. You can refer to audreygerred's advice or you can share the pbix file without sensitive data for testing purposes. Feel free to help you.


Best Regards,
Yang

Community Support Team



audreygerred
Super User
Super User

Instead of having weekending date in your columns you will need to put in the week number. When you put days in your visual, the YoY will look at that date of the prior year. Use the week number instead, then week 1 of 2024 will look at week 1 of 2023. If ppl are unsure of what the weekending date is for any given week number, you can add a legend somewhere in your report.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.

Top Solution Authors
Top Kudoed Authors