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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
pantherfanrh
Frequent Visitor

Best way to change slicer values

Hi all, I was wondering what the best way to remove values from a column in a slicer would be? For instance

 

I have a column 'Year', which has the values from 1999-2017 in it. I only want the slicer able to select years in the range of 2010-2017. What would be the best way to do this?

1 ACCEPTED SOLUTION
prateekraina
Memorable Member
Memorable Member

Hi @pantherfanrh,

 

As suggested by other users as well, you cannot add visual level filter for slicers. However, i have a crazy workaround for you.
Here it goes:

1. Create a calculated column with below dax

Slicer1 = IF(DimDate[Year] >= 2010,DimDate[Year],BLANK())

2. Create a slicer and put this column in that, you will see something like below (for you values will be between 2010 - 2017): 
Solution1.PNG
Now half the problem is solved. We just need to get rid of (Blank).

3. Create another calculated column on top of previously created column using below DAX:

Slicer2 = DimDate[Slicer1] >= 2010

Create another slicer and put Slicer2 in that. 
You will notice that it has 3 values: a) Blank b) False c) True

4. Go to Edit Interactions and make sure Slicer 2 does not filter your visuals other than Slicer 1.
5. Choose True in Slicer 2, it will leave what you need in Slicer 1.
6. So now you have what you wanted in Slicer 1, the only problem now you have to figure out is to hide Slicer 2, change its font color to white, Header - OFF.

I hope you will be good to go from here.


Thanks !!

View solution in original post

3 REPLIES 3
prateekraina
Memorable Member
Memorable Member

Hi @pantherfanrh,

 

As suggested by other users as well, you cannot add visual level filter for slicers. However, i have a crazy workaround for you.
Here it goes:

1. Create a calculated column with below dax

Slicer1 = IF(DimDate[Year] >= 2010,DimDate[Year],BLANK())

2. Create a slicer and put this column in that, you will see something like below (for you values will be between 2010 - 2017): 
Solution1.PNG
Now half the problem is solved. We just need to get rid of (Blank).

3. Create another calculated column on top of previously created column using below DAX:

Slicer2 = DimDate[Slicer1] >= 2010

Create another slicer and put Slicer2 in that. 
You will notice that it has 3 values: a) Blank b) False c) True

4. Go to Edit Interactions and make sure Slicer 2 does not filter your visuals other than Slicer 1.
5. Choose True in Slicer 2, it will leave what you need in Slicer 1.
6. So now you have what you wanted in Slicer 1, the only problem now you have to figure out is to hide Slicer 2, change its font color to white, Header - OFF.

I hope you will be good to go from here.


Thanks !!

v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @pantherfanrh,

 

As we cannot add visual level filter for the Slicers currently, you can add a report/page level filter for the 'Year' column in this scenario.

 

 

For more details about how to add a filter to Power BI Report, you can refer to this article. Smiley Happy

 

Regards

Greg_Deckler
Community Champion
Community Champion

You could simply set a visual level filter to be greater than 2009



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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