Forum Discussion
Ronald123
Resolver III
3 years agoSwitching Calculation with Field Parameters in Power BI Visuals
Hey Power BI community, I've noticed that since 2022, there's an option in Power BI to switch between calculations using field parameters. However, I'm currently working on a visual where I want...
- 2 years ago
Hi Ronald123 ,
Redo the measure to:
Total Sum = VAR _a = SELECTCOLUMNS ( Parameter, "Name",[Parameter]) RETURN SUMX ( _a, SWITCH ( [Name], "APPEL", [APPEL], "ORANGE", [ORANGE], "BANANA", [BANANA], 0 ) )I added a new row Banana to get some different results but it's working has needed:
Ronald123
Resolver III
2 years agoHi MFelix ,
The test file can now be accessed without a password.
Greets,
Ronald
MFelix
Super User
2 years agoHi Ronald123 ,
Redo the measure to:
Total Sum =
VAR _a =
SELECTCOLUMNS ( Parameter, "Name",[Parameter])
RETURN
SUMX (
_a,
SWITCH (
[Name],
"APPEL", [APPEL],
"ORANGE", [ORANGE],
"BANANA", [BANANA],
0
)
)
I added a new row Banana to get some different results but it's working has needed: