Forum Discussion
Creating a Slicer to select data from different calculated columns
Hi Anonymous ,
Not really sure how you have your setup but if you create a disconnected table with the reference that you need something similar to:
| Reference |
| Column1 |
| Column2 |
| Column3 |
| Column4 |
The you can use a switch function to get the values you need for example:
Values calculation=
Switch(
SELECTEDVALUE(Table[Reference]),
"Column1", SUM(AnotherTable[Column1),
"Column2", SUM(AnotherTable[Column2),
"Column3", SUM(AnotherTable[Column3),
"Column4", SUM(AnotherTable[Column4),
)
Now use this measure on your visuals and the table above on your slicer.
Miguel,
Thank you for your response, I'm not sure if I've set up my tables incorrectly, but this doesn't seem to be working for me. I've created the measure, but I'm not sure what I should use for the Reference. I need to think about the layout before trying this out.
Many thanks
David
- MFelix4 years agoSuper User
Hi Anonymous
The reference is just a table that you can call whatever you want and place the name of the column you need to calculate and change, then if you select that table and make the calculations according to the measure your charts should change.
Check PBIX file attach with a small example: