Forum Discussion
Dynamic column selection for matrix visual
- 7 years ago
Hi Anonymous ,
To what I can understand you want to have an option for users to select columns that they see on the matrix table that is not an option you have on PBI by default however you can create a workaround.
Create an unrelated table with all your Columns Names that you want to have as on off on your matrix.
In my case I created a table named Selector:
Columns selection
Quantity Value Then add the following measures:
Column selection = MAX(Selector[Columns selection]) Totals Columns = SWITCH([Column selection];"Quantity";[Quantity total];"Value";[Value total])
On the second measure you should add all the related measure that you have for each column you want to show.
Now create your matrix in the following way:
Rows: Category (this are the columns that you want to have the details (keep the ones you have)
Columns: Selector[Columns Selection]
Values: [Totals Columns]
Should give the result below:
See attach PBIX.
Regards,
MFelix
Hi ttt ,
If the users click on the header of the column they are abble to sort the information by that column, to have the sorting by more than one column they need to do SHIFT + CLICK on the other column headers.
Hi MFelix ,
That usually works for me when I don't have data in the Columns field. When I have Columns data clicking on a column header only put a spotlight on that column.
- AllisonKennedy5 years agoCommunity Champion
ttt I belive you can only sort by column, not by values/measure.