Forum Discussion
Cannot Post from Power BI Desktop
- Anonymous10 years ago
Ferri SWITCH does compare the values...
It takes the initial column value that you want to compare, and will evaluate each value on the expression list you define. Then replacing the value range to the static value you want..
Here is an example of using this in a calculated column which you can name "NyCoulumn"
SWITCH(TRUE(),
AND([MyColumn] >=0, [MyColumn] <=1099), "1000"
AND([MyColumn] >=1100, [MyColumn] <=1199), "1100"
AND([MyColumn] >=1200, [MyColumn] <=1299), "1200"
"1200+"
thanks for the help, but I need to compare the values therefore i will use if..else.
Ferri SWITCH does compare the values...
It takes the initial column value that you want to compare, and will evaluate each value on the expression list you define. Then replacing the value range to the static value you want..
Here is an example of using this in a calculated column which you can name "NyCoulumn"
SWITCH(TRUE(),
AND([MyColumn] >=0, [MyColumn] <=1099), "1000"
AND([MyColumn] >=1100, [MyColumn] <=1199), "1100"
AND([MyColumn] >=1200, [MyColumn] <=1299), "1200"
"1200+"