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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
LucMarv
Helper I
Helper I

How to remove (blank) from multilevel slicer

I'd like to not see the (blank) fields at all:

 

LucMarv_0-1644443680992.png

 

 

The table that feeds this slicer looks like this:

LucMarv_3-1644443823781.png

 

 

The slicer I used is the default slicer, where I dragged in 3 fields:

LucMarv_2-1644443784869.png

6 REPLIES 6
LucMarv
Helper I
Helper I

There is a custom visual called 'hierachy slicer' which has the options to hide empty levels (GREAT), but this slicer does not support a dropdown version...

TheoC
Super User
Super User

Hi @LucMarv 

 

Blanks arise due to gaps in the data model.  A quick workaround is using the Filter Pane and selecting each field to remove the blank.

 

1. Click on the visual. 

2. Go to the Filter Pane on the right.

3. Click on each of the fields you're using for the slicer.

4. Untick "BLANK".

 

Hope this helps.

Theo

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

I just tried your suggested sollution, but it actually removed all the lines with at least one blank... the only remaining items in the slicer are those with all three elements filled:

 

LucMarv_0-1644445713831.png

 

 

All the others have disappeared... Any ideas how to fix this?

The gaps in my table are intentional.

@LucMarv if there are gaps, there will be blanks unfortunately.  Have you thought about creating a separate table with the specific categories and subcategories?  Then you can create a relationship from the new table to the Fact table, and use the new table to Slice.  The new table can be without blanks?  

 

Otherwise, can you use the logic:  

 

IF GroupingL3 is blank then fill the blank with Grouping L2

IF Grouping L2 is blank, then fill the blank with Grouping L1... and so on?

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Dear @TheoC

 

When you say:

@LucMarv if there are gaps, there will be blanks unfortunately.  Have you thought about creating a separate table with the specific categories and subcategories?  Then you can create a relationship from the new table to the Fact table, and use the new table to Slice.  The new table can be without blanks?  

 

The table that this slicer is coming from is already a separate table (the tumour grouping is just a simple lookup table that links on the TUMOUR_GROUP_ID variable with the main data). 

 

So the slicer is already made from (what PowerBI calls) a dimension table which is linked to (what PowerBI calls) a fact table.

 

 

Hi @LucMarv 

 

Apologies, I'm referring to a Dim table that is structured in such a way that blanks don't exist and only the attributes of the specific groups are captured.  If you have to have so many blanks, then just break it down further into separate tables that have a one to many off one another back to the fact table.

 

So, you'd have:

  • Level 1 table
  • Level 2 table that has columns being Level 1, Level 2 but excludes any Level 2 blanks.
  • Level 3 table that has columns being Level 2 and Level 3, but excludes Level 3 blanks.

This way, your Slicer will be Level 1 category from table Level 1.  Level 2 category from table Level 2. Then Level 3 category from table Level 3.

 

Hope that makes sense?

Theo

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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