2 Replies Latest reply on Aug 23, 2016 11:03 AM by lauren.flynn.0

    Converting Excel IF function to Tableau

    lauren.flynn.0

      Hi,

       

      I am fairly new to Tableau and need some assistance in converting an excel IF formula into a calculated field in Tableau. The formula compares dates and returns various values based on whether work orders were completed on time. Here is the excel formula:

      =IF(AND(G2="",C2>TODAY()),"Open-within SLA",IF(G2="","Open-Overdue",IF(G2<=C2,"Pass",IF(G2>C2,"Fail"))))

       

      G2 is the Actual End Date of the work formatted as mm/dd/yyyy and C2 is the Required End Date of the work formatted the same way (file is attached as well).

       

      And here is the formula with the cell references replaced with my Tableau fields, but putting this in Tableau and changing the IF to IIF does not work:

      =IF(AND([Actual End Date]="",[Required End Date]>TODAY()),"Open-within SLA",IF([Actual End Date]="","Open-Overdue",IF([Actual End Date]<=[Required End Date],"Pass",IF([Actual End Date]>[Required End Date],"Fail"))))

       

      Both date fields are formatted as date fields in Tableau. Any help you can provide would be greatly appreciated! Thank you.