0

I need to convert an Excel formula that has been created using conditional statement with logic operator. I am new in Tableau and unable to create a measure using the formula mentioned below:

IF([p_category]="P Invoice","P Invoice",IF(AND([p_category]="Non-P Invoice",OR([P Required YN]="Y",OR([P Required YN]="Flat Y and N if weighted",[P Required YN]="Y if not intercompany"))),"Non-Accepted Non-P Invoice","Accepted Non-P Invoice"))
Shaon Paul
  • 153
  • 1
  • 2
  • 14

1 Answers1

1

IF/ELSE statements doesn't need you to be a Tableau expert, you just have to allocate some time to give a try.

The formula should be something like the following:

IF [p_category]='P Invoice'
THEN 'P Invoice'
ELSE (
    IF [p_category]='Non-P Invoice' AND ([P Required YN]='Y' OR ([P Required YN]='Flat Y and N if weighted' OR [P Required YN]='Y if not intercompany'))
    THEN 'Non-Accepted Non-P Invoice' ELSE 'Accepted Non-P Invoice' END
    )
END
Nicolaesse
  • 2,554
  • 12
  • 46
  • 71