Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi All
May i know how to modify the below expression :-
Solved! Go to Solution.
Download your PBIX with solution
Hi Paul,
Actually there's a better way.
In the Slicer, use Date from the Date Table in the Field and set it to only display the Year.
Then in your Filters use TopN filtering and drag Date from the Date Table into the By Value area and select to show the Latest Date, then set the filter to show the Top 5.
Regards
Phil
Proud to be a Super User!
Hi @admin11
Try this
Last 5 Years = FILTER(Year, YEAR(Date[Year]) >= 2018)
Regards
Phil
Proud to be a Super User!
@admin11 , you can create a measure. Or user slicer
Or create a column to filter
FLag = if(year([Date]) >= year(Today()) -5, 1,0)
Can you please share with me how to create expression for year , so when i use at Slicer , the Year filter will only display last 5 year.
Paul Yeo
Download your PBIX with solution
Hi Paul,
Actually there's a better way.
In the Slicer, use Date from the Date Table in the Field and set it to only display the Year.
Then in your Filters use TopN filtering and drag Date from the Date Table into the By Value area and select to show the Latest Date, then set the filter to show the Top 5.
Regards
Phil
Proud to be a Super User!
Now i start to understand that , need to make use of filter panel. thank you for sharing.
Paul
Your expression working fine. But i al looking for expression Year to display at every page user don't to tick 1 or 0.
@PhilipTreacy approach is correct , but got error.
https://www.dropbox.com/s/11dzrqm4g56zqys/PBT_V2021_333%20year%20display%202020%202021.pbix?dl=0
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
60 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |