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

Win a FREE 3 Day Ticket to FabCon Vienna. Apply now

Reply
Silvard
Resolver I
Resolver I

Remove blanks from dynamic slicer

I have a parameter fields table that consists of 20 columns from various tables.

 

I have a multi-selection enabled slicer and I need to filter out the blank/empty values dynamically.

 

Imagine that we select a Category and then get all the corresponding Products, but you now see an option to select an empty/blank value. 

 

How can we filter these out from the slicer, keeping in mind that it has to work dynamically and work regardless how many columns included/added in the filtering.

 

I only want to filter out the blanks from the columns that are being used and in a measure that we can put in the filter pane and not the solution of removing blanks/empty in power query.

 

How can we achieve this?

 

I greatly appreciate your help!

3 REPLIES 3
Poojara_D12
Super User
Super User

Hi @Silvard 

To dynamically filter out blank/empty values from a multi-selection slicer without modifying the data in Power Query, you can use a DAX measure and apply it as a visual-level filter. The measure checks whether the selected columns contain blank values and excludes them. For example, using SELECTEDVALUE() or ISBLANK() in a DAX measure can help detect blanks dynamically based on slicer selections. You then apply this measure as a filter in the filter pane, setting it to show only non-blank values. This ensures that as users select different fields in the slicer, the slicer automatically hides empty values while keeping the filtering flexible across multiple columns. This approach is efficient, does not require hardcoding column names, and works regardless of how many columns are included in filtering.

 

 

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS
bhanu_gautam
Super User
Super User

@Silvard 

Create a measure that checks if the selected values in the slicer are not blank. This measure will return 1 for non-blank values and 0 for blank values.

 

NonBlankValues =
IF(
ISBLANK(SELECTEDVALUE('YourTable'[YourColumn])),
0,
1
)


Use the Measure in the Filter Pane: Add this measure to the filter pane of your slicer visual. Set the filter condition to show only values where the measure equals 1.

Select the slicer visual.
Drag the NonBlankValues measure to the Filters pane.
Set the filter to show items when the value is 1.


 To ensure that the filtering works dynamically regardless of the number of columns included, you can create a similar measure for each column you want to filter and combine them using a logical AND operation.

DAX
NonBlankValuesDynamic =
IF(
ISBLANK(SELECTEDVALUE('YourTable'[Column1])) ||
ISBLANK(SELECTEDVALUE('YourTable'[Column2])) ||
ISBLANK(SELECTEDVALUE('YourTable'[Column3])),
0,
1
)
Adjust the measure to include all relevant columns. This measure will return 1 only if all selected columns have non-blank values.

Apply the Combined Measure: Use the combined measure in the filter pane of your slicer visual




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Hi @bhanu_gautam 

 

Thank you for your input.

 

Unfortunately this isn't working as I'm still seeing the blank/empty values.

 

Using countrows, filtering for non blank works, but the moment you get into the next column to slice for, I start to see the empty values again.

 

I don't want to filter out columns that aren't being filtered on so I can't just do a countrows over each column, as this becomes a static solution.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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