Forum Discussion

vic3197's avatar
vic3197
Frequent Visitor
3 years ago
Solved

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, ...
  • v-zhangti's avatar
    3 years ago

    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.