Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello, I am looking for a solution where the data display on chart must show up only the data Previous week data depending on the user selection on Date slicer. For example if the user selects the Date Range (28.08.23 to 13.08.24), the chart must display the the data from 05.08.24 to 11.08.24 and if the user select a different date range say 01.01.24 to 31.01.24 then depending on the Max date(31.01.24), the charts must display (22.01.24 to 28.01.24). I created a weekoffset column and applied weekoffset is -1 in filterpane for the chart visual. This works for the default max date (Today) but when the user selects a different date range then the chart goes blank. Also, I created 'IsInLastWeek' column in date table using dax and applied it on chart visual and selected 1.
Solved! Go to Solution.
Hi @Anonymous ,
Let me explain why your data doesn't change dynamically based on the slicer.
The key is that the value of a calculated column is static and is not affected by slicers or other visuals, I suggest you using measure instead. I’ve made a test for your reference:
1\I assume there is a table named Tabelle1
2\Create a calculate table
CalendarTable = CALENDAR(date(2024,1,1),date(2024,12,31))
3\Create a measure for Tabelle1
IsInLastWeek = If(WEEKNUM(Max(Tabelle1[Date]))=Weeknum(Max(CalendarTable[Date]))-1,1,0)
4\Add a slider
5\Filter data
Best Regards,
Bof
Hi @Anonymous ,
Let me explain why your data doesn't change dynamically based on the slicer.
The key is that the value of a calculated column is static and is not affected by slicers or other visuals, I suggest you using measure instead. I’ve made a test for your reference:
1\I assume there is a table named Tabelle1
2\Create a calculate table
CalendarTable = CALENDAR(date(2024,1,1),date(2024,12,31))
3\Create a measure for Tabelle1
IsInLastWeek = If(WEEKNUM(Max(Tabelle1[Date]))=Weeknum(Max(CalendarTable[Date]))-1,1,0)
4\Add a slider
5\Filter data
Best Regards,
Bof
Thank you @Anonymous
I am not able to access the PBI file you have shared. As it comes in Zip folder and when I extract, it says This file is restricted.
Hi @Anonymous ,
I've reuploaded the attachment. Kindly take a moment to review it.
Best Regards,
Bof
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
3 | |
3 | |
3 | |
2 | |
2 |