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
jpereztang
Helper I
Helper I

Weekday Last Year Comparison

Hi everybody !

 

I have a requeriment that i don't know how to achieve. Question is simple, how can I compare this year sales with exactly the same weekday sales of last year. take for instance, Today is July 1st 2016 i must compare today sales with sales on 29th June 2015 because this two days are monday of the same week.

 

You can think that's piece of cake, just DATEADD -365 days or DATEADD -1 year but I have to say there are some years that doesn't have 365days. For instance, this febrary have 29 days and febrary of last year have just 28, aka leap-year.

I think this could resolve my problem but actually dax doesn't accept 'week' as parameter

 

Ventas cliente preferente YTD:=CALCULATE(
                                                                          [Ventas cliente preferente]
                                                                         , DATEADD(Tiempo[Fecha],-52,week)
)

I hope you can help me 

Thanks in advance

 

 

 

20 REPLIES 20

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.