Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello, I am using the SWITCH command to normalize some company names. For example:
Normalized = SWITCH([Company],
"International Business Machines", "IBM",
"Microsoft", "MSFT"
All is working well however, when I there is a bracket in the name it doesn't see it. For example:
Normalized = SWITCH([Company],
"Laboratory Corp. of America (Labcorp)", "LH")
In the filter cards it’s listed is a "Blank"
There is no error on the DAX command. Any suggestions?
The data source cannot be changed so I am left with the brackets.
Hi @Anonymous ,
Best Regard
Lucien Wang
Hi @Anonymous ,
I tried the dax you provided and it works.See the below:
Check that the contents of the table match exactly what is used in Dax. And could pls provide your pbix file ? Remember to remove the confidential information.
Wish it is helpful for you!
Best Regard
Lucien Wang
@Anonymous , It should work , check for spaces
or try one of the two
Normalized = SWITCH([Company],
"Laboratory Corp. of America "(Labcorp")", "LH")
or
Normalized = SWITCH([Company],
"Laboratory Corp. of America \(Labcorp\)", "LH")
Thanks for the quick reply. Okay this is strange, neither work, however:
Laboratory Corp. of America "(Labcorp")", "LH") - this errors out the DAX
ERROR: The syntax for '(' is incorrect.
Using the backslash doesn't give me an error, but also doesn't change it and it still remains Blank in the filter cards.
However, I don't know if I copied something wrorg or PBI added it but when I add "LH" front the backslash works. For example this works:
"LH","Laboratory Corp. of America \(Labcorp\)", "LH")
Strange- but thank you!!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.