Forum Discussion

KWelsh8144's avatar
KWelsh8144
Helper II
3 years ago
Solved

IF statement with multiple conditions for unique IDs

I'm trying to get an if statement that looks at each unique ID and then meets the following criteria:    Each ID must have Complete = yes, and Type = 20 OR Type = 13 AND 23   The flag column woul...
  • Ashish_Mathur's avatar
    Ashish_Mathur
    3 years ago

    Hi,

    Try this calculated column formula instead

    Column1 = 1*(or(CALCULATE(COUNTROWS(Data),FILTER(Data,Data[ID]=EARLIER(Data[ID])&&Data[Complete]="Yes"&&(Data[Type]=20))),and(CALCULATE(COUNTROWS(Data),FILTER(Data,Data[ID]=EARLIER(Data[ID])&&Data[Complete]="Yes"&&Data[Type]=23)),CALCULATE(COUNTROWS(Data),FILTER(Data,Data[ID]=EARLIER(Data[ID])&&Data[Complete]="Yes"&&Data[Type]=13)))))

    Hope this helps.