The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
I am using a dropdown slicer on a Year field. This year field has few values (2017,2018,2019)
In the slicer dropdown, It shows:
Select all
2017
2018
2019
Now, i need to change these dropdown values like this:
Select all
Previous 2 Years
Current Year (2017,2018,2019)
Please help how to achieve this.
Thanks,,
@Anonymous
Hi jitendrabi07,
You could create a new table for the custom slicer. I want to check the result of slicer with you. When you choose previous 2 yaer, did you want to get sum of previous years(2017+2018)? Or you want to see 2017 and 2018 in visual? And the current year, did you want to see 2019 only or want to see 2017,2018,2019 in visual?
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
For previous 2 Years means, the data should be visible for 2017 and 2018.
The current year: the data should be visible for 2017,2018,2019.
Please share the DAX code how to get this.
Thanks,