Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
vic3197
Frequent Visitor

Show subsequent data after selecting a filter

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.

 

vic3197_0-1667474468366.png

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.

 

vic3197_1-1667474563170.png

Thanks for your support!

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @vic3197 

 

You can try the following methods.
Sample data:

vzhangti_0-1667540103055.png

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.

vzhangti_1-1667540224478.png

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.

vzhangti_2-1667540328485.png

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.

View solution in original post

2 REPLIES 2
vic3197
Frequent Visitor

Thanks @v-zhangti!

 

And how could I apply this to a matrix table?

 

backup FA07.PNG

 

 

v-zhangti
Community Support
Community Support

Hi, @vic3197 

 

You can try the following methods.
Sample data:

vzhangti_0-1667540103055.png

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.

vzhangti_1-1667540224478.png

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.

vzhangti_2-1667540328485.png

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.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors