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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

customize slicer drop down menu option

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,,

@Nathaniel_C 

@Anonymous 

2 REPLIES 2
dax
Community Support
Community Support

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.

Anonymous
Not applicable

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,

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors