Forum Discussion
Previous Week variance
Hi Anonymous,
Can you please share some sample data to test ? You can write the formula without calendar table.
In addition, I think your records not contain the date field but exist the week number, right?
Regards,
Xiaoxin Sheng
- Anonymous9 years agoNot applicable
Hi All,
No was a fully fledged date table.
W
- Anonymous9 years agoNot applicable
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
- motoroto9 years agoFrequent Visitor
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
- Anonymous9 years agoNot applicable
Hi Anonymous,
>>Was trying to ahcieve this in excel and was getting the error. When I then put it into PowerBI it worked first time....
Can you please share us the file to test? I think it will be help for troubleshooting.
Regards,
Xiaoxin Sheng