Forum Discussion
Filter by Column heading in matrix visual
- 8 years ago
Hi Anonymous,
Theres is a similar request on this post and if you go to the exceleratorbi link on that message you have the explanation on how to achieve a measure in rows, however you can adjust this to your model to achieve it in columns.
I pick up your data and using the solution above work out this final result, see below the step by step and also a download for a pbix sample:
1 - Create a new table:
Measures Selection
ID | Measure
1 | EUR
2 | L
3 | Variation
2 - Create a measure on the Measures Selection table:
Selected_Measure = MAX('Measure_selection'[ID])3 - Create 4 measures on the Fact_Table (name given to the basic data table):
EUR Total = SUM(Fact_Table[EUR]) L Total = SUM(Fact_Table[L])
Variation = [EUR Total] - [L Total] Matrix_values = SWITCH ( [Selected_Measure]; 1 ; [EUR Total] ; 2 ; [L Total] ;
3 ; [Variation] )4 - Add the values to your visual matrix as explained:
Rows: Product (column Fact_Table)
Columns: Purchase Date - Year (column Fact_Table) + Measure (column Measure_selection)
Values: Matrix_values (measure from Fact_table
5 - Add a slicer with the Measure Column on your report.
Final result:
Here is the pbix file.
Regards,
MFelix
Hi Anonymous,
Theres is a similar request on this post and if you go to the exceleratorbi link on that message you have the explanation on how to achieve a measure in rows, however you can adjust this to your model to achieve it in columns.
I pick up your data and using the solution above work out this final result, see below the step by step and also a download for a pbix sample:
1 - Create a new table:
Measures Selection
ID | Measure
1 | EUR
2 | L
3 | Variation
2 - Create a measure on the Measures Selection table:
Selected_Measure = MAX('Measure_selection'[ID])3 - Create 4 measures on the Fact_Table (name given to the basic data table):
EUR Total = SUM(Fact_Table[EUR]) L Total = SUM(Fact_Table[L])
Variation = [EUR Total] - [L Total] Matrix_values = SWITCH ( [Selected_Measure]; 1 ; [EUR Total] ; 2 ; [L Total] ;
3 ; [Variation] )
4 - Add the values to your visual matrix as explained:
Rows: Product (column Fact_Table)
Columns: Purchase Date - Year (column Fact_Table) + Measure (column Measure_selection)
Values: Matrix_values (measure from Fact_table
5 - Add a slicer with the Measure Column on your report.
Final result:
Here is the pbix file.
Regards,
MFelix
- Anonymous8 years agoNot applicable
Thank you MFelix for your clear explenation , it works perfectly.
I always try to search on the forum first, but didn't find that post.
- Shaina_Gupta8 years agoRegular Visitor
Hi,
I tried using your approach but I am unable to view multiple selections in my matrix.
- Anonymous8 years agoNot applicable