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.
Hi All,
I have date table with 3 yrs of data.When I want to bring the date to slicer I should see only 2 yrs of data. For eg slicer should show 2022 and 2021. Next year it should be 2023 and 2022. It should not be hard-coded in filters.
Automatically only 2 yrs value should be shown in slicer
Can we bring this in measure?
Any help is much appreciated
Solved! Go to Solution.
Hi,
Thank you for your feedback.
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
One of ways is to apply calculated column to report level filter pane.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi,
one of ways to achieve this is to create a measure something like below, and put it into Visual Filter pane and set it up like below.
Please also check the attached pbix file.
Last two years measure: =
VAR _currentyear =
YEAR ( TODAY () )
VAR _previousyear = _currentyear - 1
RETURN
IF (
SELECTEDVALUE ( 'Year'[Year] ) = _currentyear
|| SELECTEDVALUE ( 'Year'[Year] ) = _previousyear,
1,
0
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Thank you so much.But when I try to apply this measure for all pages I could not bring the measure to filter on all pages. Is there any other way to do it?
Hi,
Thank you for your feedback.
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
One of ways is to apply calculated column to report level filter pane.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
41 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
43 | |
32 | |
30 | |
18 | |
18 |