Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello dear community; I hope you are doing well 😀
I have a power BI report that is using a Live connection on a tabular model.
I have created a power bi report page that must display data only for the last 13 weeks.
my data model doesn't contain a date table; it only consists on a one big table that conatains all the necessary fields including date fields ( Year, Semester, Month and Week) and there is no day field ( I dont have the possibility to bring it in my data model)
I created the following calculated column ( flag) that I put it in a slicer :
last 13 weeks= IF ( '360ST'[YearWeek] >= MAX ('360ST'[YearWeek]) - 13 , "1", "0")
the flag doesn't work. I note that the format of Week field is YYYYWW
I appreciate any help please, thanks
Hi @Anonymous ,
You say you have Year and Week in separate date fields, I would create a calculated column with the Start Date of the Week and, then, use it to calculate the difference in weeks from its max value. From there you can move on filtering your report based on this value making sure it works when changing the year (from 2020 to 2021).
ISO Start of week formula thanks to @wgarn
Regards,
User | Count |
---|---|
25 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
25 | |
12 | |
11 | |
10 | |
6 |