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
bostewart_key7
New Member

Change Matrix Grouping With Slicer

I'm trying to allow my users to dynamically choose a group by option for the matrix control.   As an example I have sales data that is categorized by 2 different attributes, Location and Reporting Category.    These 2 attributes are not related so placing them in a hierarchy does not produce the desired result.  Ideally I'd like the Rows grouping in the matrix to be able to update based on a value selected from a slicer, where the slicer has 2 options (Location and Reporting Category).    So the data might look something like:

 

When grouped by Location (selected in the slicer):

Location    Amount

Loc 1         100.00

Loc 2         150.00

Total          250.0

 

When grouped by Reporting Category (selected in the slicer):

Reporting Category     Amount

Cat A                            75.00

Cat B                            125.00

Cat C                            50.00

Total                             250.00

 

I am stuck on how best to accomplish this in PowerBI.

1 REPLY 1
Anonymous
Not applicable

@bostewart_key7,

Do you have a sales fact table? If so, you would need to create proper relationships between fact table and Dimension table and filter option table in order to dynamically change the attribute. You can follow the guide in the blog below to achieve the requirement. If you have any questions about DAX, please share the sample data of your fact table to us.

https://www.tringuyenminh92.com/index.php/2017/10/03/dynamic-change-dimensions-in-power-bi/ 

Regards,
Lydia

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.