Forum Discussion

rogerthat's avatar
rogerthat
Helper I
4 years ago
Solved

IF/OR For multiple Columns

Hello,

 

I've been having difficulty trying to figure a way to get the outputs from 3 columns if they contain a certain string, I'm bringing these items from other tables since there's no way to create relationships and merging has been giving odd results.

 

So, if any of the types contain "Yes" they should be Accepted, if else Decline

 

IDTYPE1TYPE2TYPE3 EXPECTED OUTPUT COLUMN
1YESYESNO Accept
2YESYESYES Accept
3NONOYES Accept
4NO NO Decline

 

 

TIA

4 Replies

  • Syk's avatar
    Syk
    Resident Rockstar

    Create a conditional column and fill out the boxes to match what you need (see screenshot below)

     

  • Hi:

    This is a little wild but you can try as a measure:

    Status =
    var _concat = CONCATENATEX('Data', [TYPE1] &"-"&[TYPE2] &"-"&[TYPE3]&". ")
    var _Find = FIND("YES", _concat, 1, BLANK())
    return
    IF(HASONEFILTER(Data[ID]),
    IF(_Find >=1, "Accept", "Decline"))
    • rogerthat's avatar
      rogerthat
      Helper I

      I would assume it would be that route, but for some reason it wasn't calculating correctly just with IF but this worked.