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
Anonymous
Not applicable

Fixing a hierarchy for a slicer

Hi,

I have a brands table, let the following represent the table:

Brands

brand A

brand B
brand C
brand D
brand E
brand F
brand G
brand H
brand I
brand J

 

I have made this table using the DISTINCT function from the main table. Now some of these brands are the child brand to a parent brand. So lets assume brand B, brand E, and brand H belong to brand B. So, I wrote some DAX code to add a column to the same table which compares the values and generates something like the following:

 

Brands   |Combined Brands
brand A |brand A
brand B |brand B/E/H
brand C |brand C
brand D |brand D
brand E  |brand B/E/H
brand F  |brand F
brand G |brand G
brand H |brand B/E/H
brand I   | brand I
brand J  |brand J

 

This new table I have added to the slicer on my visual where I have added the combined brands first and then brands as the second value to the field for the slicer, but the problem is that when I click on the drop down the slicer shows all the single brands as well with a drop down to the same brand name, for example it displays down arrow on brand A to expand and it expand to brand A, however incase when it display down arrow to expand brand B/E/H it expands to Brand B, Brand E and Brand H. How can I get rid of these single drop downs as they are not required( such as brand A, brand C, brand D, brand F) ?

 

Thanks.

1 REPLY 1
jcalheir
Solution Supplier
Solution Supplier

Hi

 

A good rule of thumb would be to redesign your model creating two tables, one with the actual brands and another with the child brands like the following picture.

 

jcalheir_1-1657544412529.png

 

 

Then it will be way easyer to filter your visuals with either Parant or child brands.

 

Kind regards,
José
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 🙂

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.