Forum Discussion
phanimusunuri9
8 years agoFrequent Visitor
Week over Week Comparison
Hi All, I am trying to compare "Monday Last week's Sales" with "Monday this week's Sales". To be precise, if today is 'Monday' i want to compare it with last 'Monday', if 'Tuesday then last week ...
- 8 years ago
You should have Year, Week Number and Weekday columns in your table. Or you can generate with calculated column.
WeekNumber = WEEKNUM(Table[Date],2)
WeekDay = WEEKDAY(Table[Date],2)
Then you can create a measure like:
Difference = SUM ( Table[Sales] ) - CALCULATE ( SUM ( Table[Sales] ), FILTER ( ALL ( Table ), Table[Year] = MAX ( Table[Year] ) && Table[WeekNumber] = MAX ( Table[WeekNumber] ) - 1 && Table[WeekDay] = MAX ( Table[WeekDay] ) ) )Regards,
Ashish_Mathur
8 years agoSuper User
Hi,
Share a snapshot of your data.
Anonymous
4 years agoNot applicable
Hi Ashish,
Can you please assist me in calculating last week vs current week comparison in power bi +-
- Ashish_Mathur4 years agoSuper User
Hi,
Share some data and show the expected result. More importantly, in the Calendar table, please show a column with the week numbers.
- Anonymous4 years agoNot applicable
Share your email id, i will share pbix with you
- Ashish_Mathur4 years agoSuper User
Hi,
Upload the file to Google Drive and shre the download link here. In the Calendar Table, please enusre that you have a week number column.