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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
sixtoquiles
Helper II
Helper II

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.

print-screen.JPG

 

 

1 REPLY 1
GilbertQ
Super User
Super User

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.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.