how to remove all label in slicer

Hide the Slicer Value Label ‘All’ when nothing is selected !

Hi All,

In this use case we have to see one small use case but the impact of this is very big. Lets look into the business case first,

By default in Power BI, Slicer is used to slice the data from the table as per the selection of the end user. When I came to Power BI as fresh or transform from other visual SaaS product to Power BI, It is little tricky to understand the slicer and their label.

If we select any value in the slicer label then the slicer drop-down value label show that particular selection in label, when we select multiple values then it will automatically changed to “Multiple Selections” but have you ever noticed if we does not select anything in the slicer then the value label shows “All”. It is not wrong as per the functionality of slicer in Power BI. But it may be hard to understand the label to the end users.

Expectation,
If we don’t select anything in the slicer drop-down then the label should show “Blank” or “Nothing”
If we select any value then it will show the value label
If we select multiple items then it is okay to show as “Multiple Selections”

The first point is not directly achieve in power bi it requires some DAX workaround for that.

Okay, lets think to change the Slicer Value font color dynamically, well that was a good idea if nothing is SELECTED of FILTERED then the font will be white else black. But unfortunately currently power bi team doesn’t built the function option in slicer value font. Hope they will include in future.

So what do we do now?

Data Narrates.com

Lets first hide the Values in the Matrix when nothing is selected in the slicer drop-down.

Exclude Value = INT(ISFILTERED(Dim[City]))

Now Apply the above created measure to the visual level filter in the Matrix with any integer value (ex: 1).

Data Narrates.com

so the Matrix value is hidden when nothing is selected in the slicer, if they select any values in the slicer then the matrix will show that particular value data only.

Now coming to the tricky part,

Background Color = IF(ISFILTERED(Dim[City]), “#FFFFFF00”, “#FFFFFF”)

Create the above Measure and insert one shape and make sure the border will remove and fill with White color transparency 1000% in style option and use the above measure in the background Functions field value and make sure the white transparency 0%.

Data Narrates.com

Zoom the page and paste correctly on the “All” label. Now you can see the above image shows the slicer value label is nothing when nothing is selected in the slicer drop-down.

Data Narrates.com

Woo! We made it right.

lets have one use case for you,
what if I enable the “Select All” option in the slicer selection will that work? if not how to alter the DAX and the visual aspects. Comment are welcome.. See you in another use case.. bye.

Leave a Reply

Your email address will not be published. Required fields are marked *