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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
p0wer_user
Regular Visitor

Creating Hierarchy Slicer For Specific Values Only

Hello,

 

I'm having a hard time building a slicer that has a hierarchy for specific values only. I'm working on a customer data set.

I want to group some company names that are in the same mother company but leave other companies by themselves.

This is an example data set I have.

--------------------

Company Name

A1

A2

A3

A4

B1

B2

C

D

E

--------------------

I want to group the A1-A4 as a A group and B1-B2 as a B group in the slicer. At the same time, I want to able to see the grouped companies individually under group A and B in the slicer(like hierarchy). I don't know how to create a slicer that does this. If someone can help me with this, I would be greatly appreciated!

2 ACCEPTED SOLUTIONS
parry2k
Super User
Super User

@p0wer_user add another column in your table for the group, I'm sharing how to do it in Dax but preference is always to do it in PQ or at the source.

 

Group = LEFT ( Table[Company Name], 1 )

 

In slicer, drop group column and company name column and it will take care of it.

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

v-yifanw-msft
Community Support
Community Support

Thank you @parry2k for your prompt reply.

Hi @p0wer_user ,
@parry2k has led you on the right path. I saw that you did not respond to this reply and made an example to help you understand the issue better. I hope our replies will be helpful to you.
1. Add a new column.

 

group = LEFT('Table'[Company Name],1)

 


2. Put group and Company Name into the slicer.

vyifanwmsft_0-1714368997029.png

Final output:

vyifanwmsft_1-1714369023437.png

How to Get Your Question Answered Quickly - Microsoft Fabric Community

If it does not help, please provide more details with your desired out put and pbix file without privacy information.

 

Best Regards,

Ada Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yifanw-msft
Community Support
Community Support

Thank you @parry2k for your prompt reply.

Hi @p0wer_user ,
@parry2k has led you on the right path. I saw that you did not respond to this reply and made an example to help you understand the issue better. I hope our replies will be helpful to you.
1. Add a new column.

 

group = LEFT('Table'[Company Name],1)

 


2. Put group and Company Name into the slicer.

vyifanwmsft_0-1714368997029.png

Final output:

vyifanwmsft_1-1714369023437.png

How to Get Your Question Answered Quickly - Microsoft Fabric Community

If it does not help, please provide more details with your desired out put and pbix file without privacy information.

 

Best Regards,

Ada Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

parry2k
Super User
Super User

@p0wer_user add another column in your table for the group, I'm sharing how to do it in Dax but preference is always to do it in PQ or at the source.

 

Group = LEFT ( Table[Company Name], 1 )

 

In slicer, drop group column and company name column and it will take care of it.

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors