Forum Discussion
Weekly sales variance % format Measure
Lynzmaz , Create a date table with following columns
new columns
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)
Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)
OR
Week Rank = RANKX(all('Date'),'Date'[Year Week],,ASC,Dense) //YYYYWW format
then create measures
This Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))
Last Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-1))
Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123
https://www.youtube.com/watch?v=pnAesWxYgJ8
Hi Amit,
I have followed the steps but it is still not pulling the information. Where have I gone wrong?
Yes, I do have a calendar with week numbers already. I don't think the week rank is working.
Could I send the .pbix file for you to review?
Thanks
- v-henryk-mstf4 years agoCommunity Support
Hi Lynzmaz ,
You can share the link to your pbix file and I will answer it for you as soon as possible.
Best Regards,
Henry- Lynzmaz4 years agoRegular Visitor
Hi Henry,
Hopefully this link works.