Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
vicente89
Contributor II
Contributor II

Get the data for the same day of the same week of the same week last year.

I want to get the data for the same day of the same week of the same week last year. Example:

Today is: Wednesday, October 3, week 40 of 2023.

I want: Wednesday (October 2 in this case) of week 40 of 2022.

 

I have tried the following formulas and they don't work:

- SUM({<fecha_creacion_del_pago={'$(=Date(YearStart(Today()) - 1) + WeekDay(Today()) - WeekDay(Today(1)) - 7))'}>} venta_neta_reserva)

- SUM({<fecha_creacion_del_pago={'$(=Date(WeekStart(Today()) - 365 + WeekDay(Today()) - 1))'}>} venta_neta_reserva)

- SUM({<fecha_creacion_del_pago={'$(=AsOfDate(Today(), -364))'}>} venta_neta_reserva)

 

In Power BI it could be the following  formula:

"totalsales DATEADD = CALCULATE([Total Sales], dateadd('Date'[Date], -364, DAY))".

Labels (4)
0 Replies