Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi community!
I need your help to solve a small problem. In my graph I have to sample the last twelve weeks of data, but I also have to make it so that if I select a specific week with a filter, this week shows me its data and the 11 data prior to this.
The problem occurs when I select the filter for another week, since it only shows me the data for that week and no week prior to the one selected.
Thanks for your support!
Solved! Go to Solution.
Hi, @vic3197
You can try the following methods.
Sample data:
Make a new filter table. Two tables do not establish a relationship directly.
Table:
Slicer = VALUES('Table'[Week])
Measure:
Measure =
SWITCH (
TRUE (),
SELECTEDVALUE ( Slicer[Week] ) = BLANK (), 1,
SELECTEDVALUE ( 'Table'[Week] ) <= SELECTEDVALUE ( Slicer[Week] )
&& SELECTEDVALUE ( 'Table'[Week] )
> SELECTEDVALUE ( Slicer[Week] ) - 12, 1,
0
)
Put Measure into the view and set it equal to 1.
Show all when slicers are not selected. When the slicer is selected, it displays the data for the selected week and the previous eleven weeks.
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @vic3197
You can try the following methods.
Sample data:
Make a new filter table. Two tables do not establish a relationship directly.
Table:
Slicer = VALUES('Table'[Week])
Measure:
Measure =
SWITCH (
TRUE (),
SELECTEDVALUE ( Slicer[Week] ) = BLANK (), 1,
SELECTEDVALUE ( 'Table'[Week] ) <= SELECTEDVALUE ( Slicer[Week] )
&& SELECTEDVALUE ( 'Table'[Week] )
> SELECTEDVALUE ( Slicer[Week] ) - 12, 1,
0
)
Put Measure into the view and set it equal to 1.
Show all when slicers are not selected. When the slicer is selected, it displays the data for the selected week and the previous eleven weeks.
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 58 | |
| 45 | |
| 40 | |
| 21 | |
| 18 |