3 Replies Latest reply on Jul 1, 2018 1:39 AM by Tushar More

    How to find a new customers using calculated fields

    Amit M

      Hi Friends,


      I have a requirements in which i have to find out the new customer added on select Month of Sale(date parameter) for that i have created two calculated field (CMT New End Cust  and PMTD new end cust). First one(CMT New End Cust ) to find out all the customer names added in selected month and second one(PMTD new end cust) to find out all the customer names added from beginning till previous month(Selected month of Sale -1). This two calculations are giving me the results what i want to use in third calculation. In third calculation i want the compare the [Ship to Name] values i am getting from these two calculated fields and find out the unique values between [ship to name] and [ship to name] but not getting any clues how to do that in tableau so i need  help to write the third calculation. I searched lot of threads related to find the unique customer but could not find anything which i can modify as per my requirements and use it.


      Please provide your inputs. Thanks in advance.


      CMT New End Cust:

      IF  YEAR([Month/Year])=YEAR([Select Month of Sale])

          AND  MONTH([Month/Year])=MONTH([Select Month of Sale])

          AND  DAY([Month/Year])<=DAY([Select Month of Sale])


          [Ship To Name]



      PMTD new end cust:

      if DATEDIFF('month',[Month/Year],[Select Month of Sale])>=1

          AND  YEAR([Month/Year])<=YEAR([Select Month of Sale])

          AND DAY([Month/Year]) <=DAY([Select Month of Sale])


         [Ship To Name]