Forum Discussion
SWITCH function failing wiht measures
- 8 years ago
Banding is done in columns, not measures. Read my 2 articles here
https://exceleratorbi.com.au/banding-in-dax/
https://exceleratorbi.com.au/conditional-columns-power-bi-desktop/
Hello Ashish_Mathur
After trying both 'import' and 'direct query', I have the same error when I apply the formula:
The following syntax error occurred during parsing: Invalid token, Line 1, Offset 32, ”
This is the exact formula that I use:
Measure = SWITCH(TRUE(),
vw_PRMCancelled[Amount]<=5000,”<5K″,
vw_PRMCancelled[Amount]<=10000,”5-10K″,
vw_PRMCancelled[Amount]<=20000,”10-20K”,
vw_PRMCancelled[Amount]<=50000,”20-50K″,
vw_PRMCancelled[Amount]<=100000,”50-100K″,
vw_PRMCancelled[Amount]<=500000,”100-500K″,
vw_PRMCancelled[Amount]<=1000000,”500K-1M″,
“1M+”)
Any help will be appreciated.
Thanks
Banding is done in columns, not measures. Read my 2 articles here
https://exceleratorbi.com.au/banding-in-dax/
https://exceleratorbi.com.au/conditional-columns-power-bi-desktop/