Forum Discussion
Add/Remove Columns of Matrix Visual Using Slicer
- 4 years ago
Hi oliverblane ,
For this you need to create a disconnected table with the following format:
Now add the following measure:
Selected Measure value = SWITCH( SELECTEDVALUE(Matrix_Selection[Measure]), "Allocated" , SUM(Measure_Selection[Allocated]), "Attended", SUM(Measure_Selection[Attended]), "Planned Capacity", SUM(Measure_Selection[Planned Capacity]) )Add the Measure column from the previous table on the column below the Month, and the measure above on the values.
Result below and in attach PBIX file.
Has you can see the matrix on the bottom only show selected measures.
Hi oliverblane ,
For this you need to create a disconnected table with the following format:
Now add the following measure:
Selected Measure value =
SWITCH( SELECTEDVALUE(Matrix_Selection[Measure]),
"Allocated" , SUM(Measure_Selection[Allocated]),
"Attended", SUM(Measure_Selection[Attended]),
"Planned Capacity", SUM(Measure_Selection[Planned Capacity])
)
Add the Measure column from the previous table on the column below the Month, and the measure above on the values.
Result below and in attach PBIX file.
Has you can see the matrix on the bottom only show selected measures.
MFelixI'm trying to do something similar and essentially wondering if there is a way for the result in a switch line to contain multiple items. Ex. note how the Attended line in the switch function below contains AND (I know this doesn't work, but it's essentially what I'm going for).
Selected Measure value =
SWITCH( SELECTEDVALUE(Matrix_Selection[Measure]),
"Allocated" , SUM(Measure_Selection[Allocated]),
"Attended", AND(SUM(Measure_Selection[Attended]), SUM(Measure_Selection[OtherRange]),
"Planned Capacity", SUM(Measure_Selection[Planned Capacity])
)
In my case, if Allocated is selected I want to show that, but if Attended is selected I want to show multiple columns.