Forum Discussion
inglexjc
3 years agoPost Patron
Color coding with Multiple Colors with Multiple Text in same column
I have a table called 'Legal Files' column name is Description_1 (Visual shows Description). I was able to color code when "Letter Waived" is in the column to show the font as BLUE. But now it's...
- 3 years agoColor =VAR col = SWITCH(TRUE(),CONTAINSSTRING(SELECTEDVALUE('Legal Files'[Description_1]),"Letter Waived") || CONTAINSSTRING(SELECTEDVALUE('Legal Files'[Description_1]),"Dispo"),"Blue", CONTAINSSTRING(SELECTEDVALUE('Legal Files'[Description_1]),"Person") || CONTAINSSTRING(SELECTEDVALUE('Legal Files'[Description_1]),"WebEx"),"Red")RETURNcol
inglexjc
3 years agoPost Patron
Padycosmos I tried both of these
Color =
VAR COL = SWITCH(TRUE(),SELECTEDVALUE('Legal Files'[Description_1]= "Letter Waived"||SELECTEDVALUE('Legal Files'[Description_1])="Dispo","Blue",SELECTEDVALUE('Legal Files'[Description_1])= "Person","Red",SELECTEDVALUE('Legal Files'[Description_1])="WebEx","Red")
RETURN
COL
Color =
VAR col = SWITCH(TRUE(),SELECTEDVALUE('Legal Files'[Description_1]= "Letter Waived"||SELECTEDVALUE('Legal Files'[Description_1])="Dispo","Blue",SELECTEDVALUE('Legal Files'[Description_1])= "Person","Red",SELECTEDVALUE('Legal Files'[Description_1])="WebEx","Red")
RETURN
col
Padycosmos
3 years agoSolution Sage
This works even if the text contains other values.
- inglexjc3 years agoPost PatronColor =VAR col = SWITCH(TRUE(),SELECTEDVALUE('Legal Files'[Description_1]= "Letter Waived"||SELECTEDVALUE('Legal Files'[Description_1])="Dispo","Blue",SELECTEDVALUE('Legal Files'[Description_1])="Person"||SELECTEDVALUE('Legal Files'[Description_1])="WebEx","Red")RETURNcolStill get error.
- Padycosmos3 years agoSolution SageThis worksColor =VAR col = SWITCH(TRUE(),CONTAINSSTRING(SELECTEDVALUE(Orders[Category]),"Fur")||CONTAINSSTRING(SELECTEDVALUE(Orders[Category]),"Off"),"Red",CONTAINSSTRING(SELECTEDVALUE(Orders[Category]),"Tech"),"Yellow")RETURNcol
- Padycosmos3 years agoSolution SageColor =VAR col = SWITCH(TRUE(),CONTAINSSTRING(SELECTEDVALUE('Legal Files'[Description_1]),"Letter Waived") || CONTAINSSTRING(SELECTEDVALUE('Legal Files'[Description_1]),"Dispo"),"Blue", CONTAINSSTRING(SELECTEDVALUE('Legal Files'[Description_1]),"Person") || CONTAINSSTRING(SELECTEDVALUE('Legal Files'[Description_1]),"WebEx"),"Red")RETURNcol