Forum Discussion
MBWATSON
Helper II
3 years agoFunction 'SWITCH' does not support comparing values of type True/False with values of type Text. Con
Hello! I am fairly new to Power BI and I have seen questions similar to mine but the answers aren't working to solve my issue. I have the following SWITCH statement ROLE = SWITCH ( TRU...
- 3 years ago
Unfortunately it is still throwing the same error.
- 3 years ago
MBWATSON
Ok must be my mistake. Please tryROLE = VAR ChangedBy = '_VIB Report 2022 08 07'[STATUS CHANGED BY] VAR Department = '_VIB Report 2022 08 07'[DEPARTMENT] RETURN SWITCH ( TRUE (), ChangedBy = "DYER, HEIDI S" && Department = "WILSONVILLE", "PCP", ChangedBy = "MINGS, JENNIFER" && Department = "TANASBOURNE", "PCP", ChangedBy = "HOJNACKI, LAUREN A" && Department = "GLISAN", "PCP", "VIB" )
tamerj1
Community Champion
3 years agoMBWATSON
Strange that this is a key word. However, try
ROLE =
SWITCH (
VAR _ChangedBy = '_VIB Report 2022 08 07'[STATUS CHANGED BY]
VAR _Department = '_VIB Report 2022 08 07'[DEPARTMENT]
RETURN
TRUE (),
_ChangedBy = "DYER, HEIDI S"
&& _Department = "WILSONVILLE", "PCP",
_ChangedBy = "MINGS, JENNIFER"
&& _Department = "TANASBOURNE", "PCP",
_ChangedBy = "HOJNACKI, LAUREN A"
&& _Department = "GLISAN", "PCP",
"VIB"
MBWATSON
Helper II
3 years agoUnfortunately it is still throwing the same error.
- tamerj13 years ago
Community Champion
MBWATSON
Ok must be my mistake. Please tryROLE = VAR ChangedBy = '_VIB Report 2022 08 07'[STATUS CHANGED BY] VAR Department = '_VIB Report 2022 08 07'[DEPARTMENT] RETURN SWITCH ( TRUE (), ChangedBy = "DYER, HEIDI S" && Department = "WILSONVILLE", "PCP", ChangedBy = "MINGS, JENNIFER" && Department = "TANASBOURNE", "PCP", ChangedBy = "HOJNACKI, LAUREN A" && Department = "GLISAN", "PCP", "VIB" )