7 Replies Latest reply on Jun 16, 2016 9:26 PM by Ashish Chaudhari

    Tableau Last year net calculation with OR condition

    Shivang Desai

      Hi All,


      I was wondering about teh OR condition in Tableau.


      Example:  Please see below Excel sheet


      Screenshot (45).png


      I need to calculate Last Year Net based on current sales. So when the current week sales are 0 or blank I dont need Last Year Net.


      Calculated field:


      IF [New Week Status] = 'Current Full Week' AND (NOT(ISNULL(Net))) OR (Net > 0)

      THEN [LastYear_Net]  end


      The above works for the 1st excel file, but whn I use this formula for the below file, it shows me all the total and doesnt filter 0's.


      Screenshot (61).png


      Could anybody help me on this?


      Kind Regards,

      Shivang Desai