Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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?
Solved! Go to Solution.
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):
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 !!
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):
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 !!
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.
Regards
You could simply set a visual level filter to be greater than 2009
User | Count |
---|---|
76 | |
75 | |
46 | |
31 | |
27 |
User | Count |
---|---|
99 | |
91 | |
51 | |
48 | |
47 |