Overview
Most Power BI developers face this issue while developing a Power BI Report. Power BI considers “null” values as Blank and shows it in the Slicer, as shown in the below screenshot.
There are so many other workarounds to remove this null value but those did not work effectively earlier. We can remove (Blank) by applying the Visual Level Filtering on the Slicer.
Power BI didn’t allow us to apply Visual Level Filtering earlier which was a major drawback.
In June 2019, Microsoft released an update in which we can apply the Visual Level Filtering on the slicers as well.
For your reference and practice, I have uploaded the code file on GitHub. You can directly download it using this
link.
So, now let’s get started!
Step 1
Below is a sample screen of our data source.
We can see that some of the employees don’t have a value for the department.
Step 2
Add a slicer with department field. It shows (Blank) in the dropdown.
Step 3
Add a Visual Level Filter for the visual.
Select the Slicer Visual, then open the Filter pane.
From,
- Filter Type: Advanced Filtering
- Show items when the value: Is not Blank
Click on "Apply Slicer".
Step 4
And here it is; the slicer has been applied successfully.
Conclusion
This is how we can easily remove (Blank) from the Power BI Slicer.
Isn’t it amazing?
Stay connected with me for more amazing articles!