Forum Discussion
Showing Last Week as true in a Calculated Column
- 5 years ago
MH3 , Based on what I got you can have columns like these. Merge using var if needed
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1 //Monday Start
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)Week Type = Switch( True(),
[start week]<=Today() && [end date]>=Today(),"This Week" ,
[start week]<=Today()-7 && [end date]>=Today()-7,"Last Week" ,
[Week Name]
)
MH3 , Refer my Blogs of WOW can help
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
Thanks for your Blog link amitchandak
But can you help me with this, Ihave to deliver it to the client,
Right now I have a slicer of Seasonal Week on my Weekly Report, and I have to create another Weekly report which will show only the Last Week Data based on filter of the calculated column which I had created.
True = last Week,
False = This Week,
False = rest of the weeks, how should I apply it to that report?
- amitchandak5 years ago
Super User
MH3 , Take a slicer of the page-level filter and set it to true?
- MH35 years ago
Helper V
amitchandak
I have used that Column and applied the Basic filtering of True, with Seasonal Weeks, the silcer picking up data correct but it's not selecting that Week in the slicer and hence the data is not being filtered
ScreenShot- amitchandak5 years ago
Super User
MH3 , That is not possible. You have to show the week name on a card visual. The slicer will not show that. You can check for Dynamic Title
https://www.youtube.com/watch?v=TYLKDPcvgK8
https://www.blue-granite.com/blog/create-a-dynamic-title-in-power-bi-updated