Forum Discussion

sixtoquiles's avatar
sixtoquiles
Icon for Helper II rankHelper II
9 years ago

Slicer and Old Data

HI, I have a Slicer with Year with Quatter. Very Old Year from 1974, This is the situation:

1. I want to show only the last 2 year (2016 - Q1, 2016-Q2, 2016-Q3, 2016-Q4, etc..) in the slicer,

2. But in the chart I need all old information

 

If i choose 2016-Q4, see all the data from 2016-Q4 and Oldest Data.

If I choose 2017-Q1, see all the data from 2017-Q1 and oldest data.

 

Any advise, suggest, is very welcome.

 

 

1 Reply

  • Hi sixtoquiles

     

    You could use the measure below, which will always get the value you have selected on your slicer

     

    Oldest Date Selection =
    CALCULATE (
        [Headcount],
        FILTER (
            'Table Name',
            'Table Name'[QY] <= LASTNONBLANK ( 'Table name'[QY], [Headcount] )
        )
    )

    Then what you could do on your slicer is to filter it out, so that it only shows the values for the last 2 years. And then change the Interactions so that it will not interact with the visual. And in theory this should work because the measure will take into account what has been selected on the slicer.