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
Anonymous
Not applicable

YOY by Weekending date

Hi,

 

I am struggling to figure out how to create a YOY based off weekending date. I 3 tables 2018 revenue, 2019 revenue, and a dates table. I have calculated the weekending dates in my dates table and they correspond with the W/E dates in both of my revenue tables. 

 

My revenue tables consist of 

 

Par year | Region | Weekend date | Week Number | Revenue

 

My issue is that the weekending dates are different betweeen the two years I am trying to compare (18/19). I am looking for advice on how to equalize the dates so I can get a true year over year by weekending date. 

 

Any help is greatly appreciated. 

1 REPLY 1
Anonymous
Not applicable

If you have a "week of year" number in your dates table, you could do something like this:

Revenue YoY = 
var __WeekOfYear = MAX('Date'[WeekOfYear])
var __ThisYearRevenue = CALCULATE(SUM('2019 Revenue'[Revenue])
var __LastYearRevenue = CALCULATE(SUM('2018 Revenue'[Revenue])
return __ThisYearRevenue - __LastYearRevenue 

Hope this helps,

Nathan

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.