Forum Discussion
Toggle data values in a slicer
- 1 year ago
Hi DioLago79
The most direct method to switch the column used on a slicer would be to create a field parameter containing the two possible columns, along with a slicer to select the field parameter value itself.
https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-field-parameters
Depending on the model and the nature of the visuals, you could also use a calculation group approach:
https://www.sqlbi.com/articles/using-calculation-groups-to-switch-between-dates/
With this approach, the slicer would use a column from the date table, say
'Date'[Date], but changing the calculation item selection would change the relationship applied when evaluating measures.Would either of these methods work for you?
Hi DioLago79
The most direct method to switch the column used on a slicer would be to create a field parameter containing the two possible columns, along with a slicer to select the field parameter value itself.
https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-field-parameters
Depending on the model and the nature of the visuals, you could also use a calculation group approach:
https://www.sqlbi.com/articles/using-calculation-groups-to-switch-between-dates/
With this approach, the slicer would use a column from the date table, say 'Date'[Date], but changing the calculation item selection would change the relationship applied when evaluating measures.
Would either of these methods work for you?
- DioLago791 year agoNew Member
Thank you for the succinct response! I ended up using the parameter approach in my scenario, after going through all of the answers I got. It was the easiest in my opinion.