
1. Re: Cohort analysis
Paul Wachtler Nov 8, 2018 11:22 AM (in response to Lambro Anastasiou)1 of 1 people found this helpfulHi Lambro,
If you can upload your Tableau workbook, that'd help. But I think you're looking for something like this (obviously make sure to rename the fields to what you have them named in your workbook).
First calculate your cohorts  this will give you the very first order date for each driver.
Field Name: [First Purchase]
{fixed [driver]: min([purchase date])
If you want to cohort that into months, you can use:
datetrunc('month',[First Purchase])
So now you'll have all of your drivers cohorted into the first month they made a purchase. Drop that onto your rows shelf so each cohort has it's own row. Then drop the class month, or whatever you're calling your other month field onto column. You can then create a calculation that divides the total number of hours by total drivers and drop that onto your marks card  it'll separate out by cohort and class month.
That should give you what you're looking for. Like I said, if you can attach a workbook for this it'd be helpful.
Best,
Paul

2. Re: Cohort analysis
Lambro Anastasiou Nov 13, 2018 2:35 AM (in response to Lambro Anastasiou)Thanks Paul
The workbook is commercially sensitive  is there a way I can share without giving access to underlying data or perhaps I can create a dummy dataset to understand the principle.
I've managed to get as far as the calculation "You can then create a calculation that divides the total number of hours by total drivers and drop that onto your marks card  it'll separate out by cohort and class month."
I can create a cumulative count of learner hours using the quick calculation >> running total field. I'm not sure how to then divide that by total learners for the cohort? Would you use secondary calculation or should I pop the entire formula into a calculated field including the running total?
Thanks again
Lambro

3. Re: Cohort analysis
Lambro Anastasiou Nov 13, 2018 2:38 AM (in response to Lambro Anastasiou)How to divide a column of data by grand total? I think this might be the ticket.

4. Re: Cohort analysis
Paul Wachtler Nov 13, 2018 6:32 AM (in response to Lambro Anastasiou)Hi Lambro,
After you completed the first two steps, you should have a view with the class month across the columns, and the driver cohort months down your rows. I was suggesting a calculation where you take your lesson hours field and divide it by the count of drivers, something like this:
sum([lesson hours]) / countd([driver])
That will average out the numbers per person. Take that calculated field and place it on your label mark.
If you're still unclear, it would be helpful if you could put together some dummy data so we can mockup what this looks like.
Best,
Paul