Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello. I'm trying to build a filter that would select records from a large dataset where a certain value is found in any of columns listed. Below is my code but i'm receiving an error in expression message. Any assistance you can offer is appreciated
=if(
(
WildMatch('00B00ZX',PrincipalDiagnosisCD),
OR if WildMatch('00B00ZX',OtherDiagnosis1CD),
OR if WildMatch('00B00ZX',OtherDiagnosis2CD),
OR if WildMatch('00B00ZX',OtherDiagnosis3CD),
OR if WildMatch('00B00ZX',OtherDiagnosis4CD),
OR if WildMatch('00B00ZX',OtherDiagnosis5CD)
)
,'yes','no')
I believe you're not using IF() and Wildmatch() syntax right. And if I understand what you're trying to achieve then try this
IF(WildMatch(PrincipalDiagnosisCD,'*00B00ZX*')
or WildMatch(OtherDiagnosis1CD,'*00B00ZX*')
or WildMatch(OtherDiagnosis2CD,'*00B00ZX*')
or WildMatch(OtherDiagnosis3CD,'*00B00ZX*')
or WildMatch(OtherDiagnosis4CD,'*00B00ZX*')
or WildMatch(OtherDiagnosis5CD,'*00B00ZX*'),'Yes','No')
I believe you're not using IF() and Wildmatch() syntax right. And if I understand what you're trying to achieve then try this
IF(WildMatch(PrincipalDiagnosisCD,'*00B00ZX*')
or WildMatch(OtherDiagnosis1CD,'*00B00ZX*')
or WildMatch(OtherDiagnosis2CD,'*00B00ZX*')
or WildMatch(OtherDiagnosis3CD,'*00B00ZX*')
or WildMatch(OtherDiagnosis4CD,'*00B00ZX*')
or WildMatch(OtherDiagnosis5CD,'*00B00ZX*'),'Yes','No')
If(PrincipalDiagnosisCD&'/'&
OtherDiagnosis1CD&'/'&
OtherDiagnosis2CD&'/'&
OtherDiagnosis3CD&'/'&
OtherDiagnosis4CD&'/'&
OtherDiagnosis5CD like '*00B00ZX*'
,'yes','no')
This seems to have worked. Thank you!