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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
harini14
Regular Visitor

Calculate YOY% change based on the custom calendar

Hello Team,

 

I am new to Power BI and I am looking for some help with the YOY% calculation based on the custom calendar. 

 

Our fiscal calendar is from July to Jun and I have data at the weekly level. I have mapped the weekly data to get the months. Now I need to calculate the % change year over year i.e July 2017 Vs July 2016 and so on for other months.

 

Could you please let me know how do I calculate this?

 

 

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @harini14

Does Stachu's suggestion slove your problem?

If it helps, could you accept this reply as a solution.

If not, could you share some example data so i can analyze for you better?

Anyway, here is a similar thread regarding how to create YOY% calculation.

https://community.powerbi.com/t5/Desktop/Comparing-this-year-and-last-year-measure-on-a-bar-chart/td...

 

Best Regards

Maggie

Stachu
Community Champion
Community Champion

if I understand correctly the YOY for month is not really affected by the custom calendar
so you could do something like this

YOY% =
DIVIDE (
    [Measure],
    CALCULATE ( [Measure], SAMEPERIODLASTYEAR ( Calendar[Date] ) )
)

where Calendar is the date table, and [Measure] is the measure you want to compare

for YTD calculation you would use something like this

YTD YOY% =
DIVIDE (
    CALCULATE( [Measure], DATESYTD( Calendar[Date] , "31-06") )
    CALCULATE ( [Measure], SAMEPERIODLASTYEAR (  DATESYTD( Calendar[Date] , "31-06") ) )
)

you may play a bit with the date format - I think it should match your locale



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.