Forum Discussion
Dropdown menu for a slicer
- 5 years ago
Hello Anonymous ,
Create a new calculated column (not measure) with number groups (ranges). Use the formula below. Then add it in a slicer
Group Values= SWITCH ( TRUE (), Table1[column X] >= 0 && Table1[column X] < 7000, "0-7000", Table1[column X] >= 7000 && Table1[column X] <= 8000, "7000-8000", "other" )
Hello Anonymous ,
Create a new calculated column (not measure) with number groups (ranges). Use the formula below. Then add it in a slicer
Group Values=
SWITCH (
TRUE (),
Table1[column X] >= 0
&& Table1[column X] < 7000, "0-7000",
Table1[column X] >= 7000
&& Table1[column X] <= 8000, "7000-8000",
"other"
)
- Anonymous5 years agoNot applicable
I right clicked my table and selected "New column" and used the code that you made.
I'm getting an error "Unexpected expression" in few spots in the code.
This is your codeI added a semicolon behind TRUE(); and "0-7000" and "7000-8000"; and it still complaining.
- themistoklis5 years ago
Community Champion
maybe it has to do with your regional settings... instead of comma (,) use semicolon (;) in the formula
on the second image you have commas in couple of places (before the number range)
- Anonymous5 years agoNot applicable
Thank you, it works now.