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]
)
Thanks amitchandak ,
Working Great!!
It shows Winter Week 16 as Last Week, and Winter Week 17 as This Week.
I need little help over here
But, I want to apply this column as a filter to a weekly report and send that weekly report on every monday and they can see the last week filtered report due to this column.
Because, Power BI Email Subscription don't send the report in the last week selected slicer, it always send the report in the slicer which were selected before to counter this problem I used this last week logic and use that column as a filter which will always be filtered with the last week data.
but I dont' see any data when I applied it as a filter any ideas?
- amitchandak5 years ago
Super User
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- MH35 years ago
Helper V
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?