Forum Discussion
SWITCH with two results possible?
Hi Pikachu-Power,
You can create a new table with two display values and use on raw chart legend fields, then you can use the following measure formula to switch between different results based on current axis and legend group:
Dyanmic measure =
VAR selectedDisplay =
SELECTEDVALUE ( Cateogry[DisplayValue] )
VAR _SelectedMeasure =
SELECTEDVALUE ( 'Measure_Selection'[Measure] )
RETURN
IF (
selectedDisplay = "Display_Value_1",
[A],
SWITCH (
_SelectedMeasure,
"SelectionA", [B],
"SelectionB", [C],
"SelectionC", [D],
"SelectionD", [E]
)
)
Regards,
Xiaoxin Sheng
Hm... seems not to work. Can you explain the steps in more detail? How does the new table look like and what do you mean with use on raw chart legend fields?
Do I put the Dyanmic measure in the value field of a bar chart? Then it only shows [A] and not the combination of [A] and [B] or [A] and [C] or and so on.
When you have two measures in the value field of a bar chart then a legend field dont accept a measure right?
- Anonymous5 years agoNot applicable
Hi Pikachu-Power,
Perhaps you can share a pbix file with some dummy data then I can build a sample visual to display these results.
Regards,
Xiaoxin Sheng