Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm looking to create a dimension in a table using an IF statement but it's not working. So I have -
IF FeedType <> 'OUTS' and RefDesc ='PSCD*' or 'PHCD*' or 'PHTD', 04,
IF Feedtype = 'OUTS' OR RefDesc= 'HICD*', '05'
What am I doing wrong?
When you do an OR you do have to define the field again or use the Match() function. i.e.
IF RefDesc='x' or RefDesc='y'..
Might be worth reviewing the wildmatch() function also.
Can you elaborate your requirement as if you need any of the following values?
RefDesc ='PSCD*' or 'PHCD*' or 'PHTD' ALSO Feedtype = 'OUTS' OR RefDesc= 'HICD*', '05' - Wether it is "or" or "And"
After clearing your posted statement try this:
=IF (FeedType <> 'OUTS' and RefDesc ='PSCD*' or 'PHCD*' or 'PHTD', 04,
IF (FeedType = 'OUTS' OR RefDesc= 'HICD*', '05'))
Thanks!!
@kev6brown As below.
If(not Match(FeedType,'OUTS') and WildMatch(RefDesc,'PSCD*','PHCD*','PHTD'), 04,
If(Match(FeedType,'OUTS') or WildMatch(RefDesc,'HICD*'), 05, Null()))