Forum Discussion
Ronald123
3 years agoResolver III
Switching 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
2 years agoResolver III
Hi MFelix ,
The test file can now be accessed without a password.
Greets,
Ronald
MFelix
2 years agoSuper User
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: