Forum Discussion
SWITCH
- 7 years ago
SWITCH itself cannot change the measures in the chart, it's basically a multiple IF
you can use a set of measures like below - in this case the measure will stay the same and just show different value:
Current = SWITCH ( SELECTEDVALUE ( Slicer[NCO-AHT] ), "NCO", SUM ( Table[aNCO] ), "AHT", SUM ( Table[aAHT] ), BLANK () )Budget= SWITCH ( SELECTEDVALUE ( Slicer[NCO-AHT] ), "NCO", SUM ( Table[bNCO] ), "AHT", SUM ( Table[bAHT] ), BLANK () )if you want to keep the setup as is then you may try with bookmarks
https://docs.microsoft.com/en-us/power-bi/desktop-bookmarks
I'm not sure whether they will remember changing the measures, if not you may create overlapping charts, and set actions to hide the non relevant one. So e.g. if you select NCO in the slicer bookmark will hide all non-NCO charts and make visible only the one with NCO set of measures
Thanks Stachu. I am new to power bi. Yes i wanted to show them seperately(and add more later on). below will clear this more. I have created slicer called Measure which is a seperate table (KPI) and is not lined. I wanted to select NCO and it will show all NOC (aNOC,bNCO,LeNCO,LyNCO) from workforceKPI_YOY table.
SWITCH itself cannot change the measures in the chart, it's basically a multiple IF
you can use a set of measures like below - in this case the measure will stay the same and just show different value:
Current =
SWITCH (
SELECTEDVALUE ( Slicer[NCO-AHT] ),
"NCO", SUM ( Table[aNCO] ),
"AHT", SUM ( Table[aAHT] ),
BLANK ()
)
Budget=
SWITCH (
SELECTEDVALUE ( Slicer[NCO-AHT] ),
"NCO", SUM ( Table[bNCO] ),
"AHT", SUM ( Table[bAHT] ),
BLANK ()
)
if you want to keep the setup as is then you may try with bookmarks
https://docs.microsoft.com/en-us/power-bi/desktop-bookmarks
I'm not sure whether they will remember changing the measures, if not you may create overlapping charts, and set actions to hide the non relevant one. So e.g. if you select NCO in the slicer bookmark will hide all non-NCO charts and make visible only the one with NCO set of measures