Forum Discussion
IF Formula Help AGAIN
- 5 years ago
Anonymous ,
I suppose your Answer column is of Number type.
If you need a calculated column, then
Ans_Cat_cln = SWITCH ( TRUE (), ISBLANK(T[Answer]), BLANK (), T[Answer] <= 1, "0-1 Active", T[Answer] <= 4, "2-4 Active", "5+ Active" )If you need a measure, then
#Ans_Cat = VAR currentAnswer = MAX ( T[Answer] ) RETURN IF ( HASONEVALUE ( T[Answer] ), COALESCE ( SWITCH ( TRUE (), ISBLANK(currentAnswer), BLANK (), currentAnswer <= 1, "0-1 Active", currentAnswer <= 4, "2-4 Active", "5+ Active" ), "" ) )If this post helps, then please consider Accept it as the solution ✔️to help the other members find it more quickly.
Try
For a calculated column:
Ans_Cat =
SWITCH(TRUE(),
ISBLANK(Table [Answer]), BLANK(),
Table[Answer] <= 1, "0-1 Active",
Table [Answer] <=4, "2-4 Active",
"5+ Active")
If you need this as a measure, you will need to wrap the expression with SUM, as in SUM(Table[Answer])
Hi PaulDBrown
It didn't seem to work... it said I had too many agruements in place but I can't figure out where!
- PaulDBrown5 years agoCommunity Champion
What is the data type for the column Table[answer]?
Also, are you adding this as a calculated column to a table or are you creating a measure?
- Anonymous5 years agoNot applicable
Thank you so much!!