Forum Discussion
Swapping columns based on slicer values
Hello All,
I have a ticket table having date like below daily wise.
My requirement is I need to show a slicer which have values like daily,weekly,monthly.
If the user selects daily I need to show daily data
If the user selects Monthly I need to show monthly data.(Here I need to aggrigate data for monthly)
If the user selects Weekly I need to show weekly data. (Here I need to aggrigate data for Weekly)
So I created a table in power bi with these values and showing as slicer.
and I wrote dax for weekly and monthly like below.
Monthly view Column:
Weekly view Column:
Daily view Column:
Daily Test ='Tickets'[containment.Date]-
Now I created a dax column like below change columns based on slicer selection but its not working.
1 Reply
- amitchandakSuper User
Anonymous , if you simply want to change the measure you can consider field parameters
Power BI Field Parameters — A Quick way for Dynamic Visuals: https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9afd
Power BI Field Parameters- Measure Slicer and Axis/Dimension slicer: https://youtu.be/lqF3Wa1FllE
Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725for refer this approch
https://medium.com/chandakamit/power-bi-when-i-felt-lazy-and-i-needed-too-many-measures-ed8de20d9f79