3 Replies Latest reply on Aug 14, 2017 6:38 PM by Zhouyi Zhang

    New vs Retuning Customer? Group by number of records?

    Benjamin Cole

      Hi Ya'll, I need help!

       

      I would like to view by movie title and know the % of new vs returning customers/users

      A - The % of new vs returning user Ids

      B - ....

      C - ....

       

      I think I may have to duplicate my data source and use it as a denominator, but currently stuck and would love some help. THANKS.

       

      Here is my data

      Screen Shot 2017-08-12 at 4.00.58 PM.png

       

      I can count by movie title

      Screen Shot 2017-08-12 at 4.01.39 PM.png

       

      I can also group by discrete number of records and color on User ID

      Screen Shot 2017-08-12 at 4.01.56 PM.png

      https://www.theinformationlab.co.uk/2013/06/24/histograms-on-aggregate-measures/

        • 1. Re: New vs Retuning Customer? Group by number of records?
          Zhouyi Zhang

          Hi, Benjamin

           

          Is this the outcome you are after?

           

           

          Workbook attached for your reference.

           

          Hope this could help

           

          ZZ

          • 2. Re: New vs Retuning Customer? Group by number of records?
            Benjamin Cole

            Wow Zhouyi,

             

            This is exactly what I needed! Thanks you!!

             

            I have two follow up questions

             

            Question 1

            As it turns out the alphabetic order of movie titles is not the order I'd like to use when calculating new/repeat users.  I show my solution below, but thought you may have a less archaic way of doing the same thing.

             

            Lets say for example that I wanted to use this order

             

            B % new/returning

            C % new/returning

            A % new/returning

             

            My solution was to create a new column in my data titled "order" that I then used instead of movie title.

             

            NEW ORDER COLUMN

            Screen Shot 2017-08-14 at 5.31.26 PM.png

             

            ORDER COLUMN USED IN CALC

            Screen Shot 2017-08-14 at 5.32.51 PM.png

             

            SOLUTION IN DIFFERENT ORDER

            Screen Shot 2017-08-14 at 5.30.03 PM.png

             

             

            Question 2

            This calc is kinda like a loop? [Order] <> { FIXED [User ID]:MIN([Order])}

            Stating that if the rows order is not equal to the minimum order of that userID then title that record repeating?

            I understand you logic and for some reason I'm having trouble knowing how to think broadly about LOD calcs and their applications. They seem critical, do you have any advice on how to know when to implement them?

             

            Bonus Point Question 3!

            Who are you?

            Do you work for Tableau?

            Can I compensate you for your help?

             

            Many thanks,

            Ben

            • 3. Re: New vs Retuning Customer? Group by number of records?
              Zhouyi Zhang

              Hi, Ben

               

              Glad it works for you.

               

              To your 1st question, adding order is brilliant,  another way I could think of is to use date, e.g. movie on shelf date.

              2nd question, it is not a loop, Tableau has the feature of LOD, which to my understanding is something similar to "over partition by" in SQL query so that you could calculate the aggregation value in row level.

              here are two links you may interest in

              Overview: Level of Detail Expressions

              Top 15 LOD Expressions | Tableau Software

               

              3rd question, this is a Tableau company provided community, a lot of people like me are volunteer to help, because initially I got help from other people the same as you.

               

              ZZ