Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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.
@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
User | Count |
---|---|
130 | |
108 | |
101 | |
67 | |
62 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |