1 Reply Latest reply on Sep 7, 2018 11:22 PM by Yuriy Fal

    need help Cohort analytics

    elodie verkade

      Hi,

       

      I'm busy building a report to calculate retention & churn of my customers, I'm very new on Tableau so I used a pre-build example.

       

      All is good unless all his based on "oder date"; so the "first order date" is not taken in consideration, so new customers are showing as "Reactivate" - on the example below and attached, I would liek to see "First period, churn" and not "Reactivate, churn"

       

       

      I hope someone can help

       

      Elodie

        • 1. Re: need help Cohort analytics
          Yuriy Fal

          Hi Elodie,

           

          If you want to apply a "New Customer" logic,

          simply changing the [Reactivate] calculation could help:

          IF     datetrunc([Parameters].[Period],[Order Date]) =

          min(datetrunc([Parameters].[Period],[First Order Date]))

          THEN   0

          ELSEIF   [Period #] % 2 = 1 

          THEN [Period Bin 2]

          ELSE [Period Bin 1]

          END

           

          or in the case you wouldn't have a [First Order Date] pre-calculated in the datasource:

          IF     datetrunc([Parameters].[Period],[Order Date]) =

          {FIXED [Customer Name] : min(datetrunc([Parameters].[Period],[Order Date]))}

          THEN   0

          ELSEIF   [Period #] % 2 = 1 

          THEN [Period Bin 2]

          ELSE [Period Bin 1]

          END

           

          Besides, changing the Alias on the [Reactivate] value of 0 to "New" --

          instead of the "First Period" (as made initially by yours truly) --

          would give the [Cohort] combined values (Aliases) as expected.

           

          Yours,

          Yuri