Forum Discussion
LUCASM
7 years agoHelper IV
CASE Statement with Like
I need to replicate this SQL case statement in Power BI somehow. CASE
WHEN [PC Name] like '%ZENBUS%' THEN 'BUSINESS'
WHEN [PC Name] like '%ZENWEB%' THEN 'ONLINE'
WHEN [PC ...
Omega
7 years agoImpactful Individual
Create a column instead of a measure and try the below formula:
Column = Switch (True (), [PC Name] = "%ZENBUS%", "BUSINESS",
[PC Name] = "%ZENWEB%", "ONLINE",
[PC Name] = "%ZENUSE%","STORE",
[PC Name])- LUCASM7 years agoHelper IV
Hi khder312
I'm not sure that works. All my results default to [PC Name].
It maybe that this is because it is not a like but an equals even if we use "%xxxxx%"
I do however agree with the column part of your solution which I just found.