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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
pat1214
Frequent Visitor

Grouping states in slicer

Hello,

I have a field in my table called 'Location' which has different US states, US Territories and International. I created a slicer for 'Location' so the end user can view student enrollments by different states etc. I need to be able to group all the states under 'States', if it is a US Territory, then 'US Territory' else 'International'. So essentially in my slicer, I will have just 'states', 'US Territories' and 'International'. 'States' would drop down to show selections for all 50 states. Hope this makes sense! Picture 1 is how the field in the table looks like. Thank you!

Capture.JPG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @pat1214 ,

Unfortunately, you can't direct grouping your data in the slicer.
I'd like to suggest you add a custom column with switch function or if statement to manually setting groups for your records. Then you can use them to create a hierarchy field and use it in custom visual hierarchy slicer.

How to create and use a Power BI Hierarchy 

HierarchySlicer 

Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

HI @pat1214 ,

Unfortunately, you can't direct grouping your data in the slicer.
I'd like to suggest you add a custom column with switch function or if statement to manually setting groups for your records. Then you can use them to create a hierarchy field and use it in custom visual hierarchy slicer.

How to create and use a Power BI Hierarchy 

HierarchySlicer 

Regards,

Xiaoxin Sheng

JosefPrakljacic
Solution Sage
Solution Sage

Hey @pat1214 ,

 

you switch to the Power Query Editor (by pressing edit queries).

There you add a new "Conditional Column" where you write the conditions you have described here.

 

Then you put the new created column into your slicer.

 

Finito

 

If this post was helpful may I ask you to mark it as solution and give it a 'thumbs up'? This will also help others

Have a nice day!

BR,
Josef
Graz - Austria

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (3,020)