7 Replies Latest reply on Jan 9, 2018 8:43 AM by Jim Dehner

    Case Statement Help

    Vasudeva Veeragandham

      Hi Champs,


      I am getting confusion to write the case statement in tableau, Can any one help me to sort it out , I am recently started developing the tableau reports and doing POC in this.


      Case statement from Oracle custom sql:



              WHEN a.Emp_ID    = 2000001

              AND b.Group_type = 'REFUNDPTS'

              THEN b.refill_points * - 1

              WHEN a.rec_id    = 2000001

              AND a.Group_type= 'PURCHPTS'

              THEN b.refill_points

              ELSE 0

            END AS refill_points


      A and B are alias for the tables.


      Please help me out from this situation