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

@AnujMishra_09 

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