Forum Discussion
Previous Week variance
Hi All,
No was a fully fledged date table.
Was trying to ahcieve this in excel and was getting the error. When I then put it into PowerBI it worked first time....
Wierd..
Thanks for help though guys.
Anonymouskcantor
Hello, I have a similar problem with performing calculations based on a previous dates.
What I have been asked is calculate difference between every single day and the average of the same weekday of
the last 4 weeks.
So far I have managed to do so by creating a measure with the following sintax
Var % = [Sales]/
((CALCULATE([Sales];DATEADD(‘DATE’[Date];-7;Day))+
CALCULATE([Sales];DATEADD(‘DATE’[Date];-14;Day))+
CALCULATE([Sales];DATEADD(‘DATE’[Date];-21;Day))+
CALCULATE([Sales];DATEADD(‘DATE’[Date];-28;Day)))/4) -1
But I have the feeling there must be a simpler way to do so.
Thanks in advance