Forum Discussion
Matrix with Dynamic Row/Column Headers
Hi!
Let's say I have a table with the columns: ID, Attribute 1, Attribute 2, Attribute 3... where each of the attribute fields can be either A, B or C in value.
I'm trying to create a matrix visual whose row headers are directly linked to a slicer which lets you choose the attribute (1, 2 or 3) and whose column headers are directly linked to a second slicer which lets you choose the attribute. The matrix values when they show how many IDs are within each combination of attribute values.
Is there a way to achieve this using DAX alone and without producing a great big unpivot table?
Thanks,
Ben
8 Replies
- amitchandakSuper User
BenjyPowerBI , Unpivot this data. That will give Attribute and value , Use Attribute and value both row and column and do count of ID
https://radacad.com/pivot-and-unpivot-with-power-bi
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
- BenjyPowerBIFrequent Visitor
Hey Amit,
The inclusion of an unpivot table makes the .pbix file size way too big to work with (and publish) so I need a workaround using DAX if possible 😕
- PaulDBrownCommunity Champion
Work with a filtered dataset to reduce the size and reconnect to the full dataset once published
- PaulDBrownCommunity Champion
A very good question for which I have no answer! (I would say go for it...)
Ps: and report your findings if you do so!