Reputation: 117
I am trying to make a retention cohorts report in Tableau which looks like the one below:
I have a DataSet which does precisely this calculation however the format is a little different and based on that I am able to achieve the following graph:
I want to figure out if there is a way to calculate dates rather than " x months since date" for X-AXIS so that my graphs look like the one above.
Attached is the workbook for reference. TABLEAU WORKBOOK
Upvotes: 1
Views: 674
Reputation: 4166
Create a calculated field that will add the cohort date and the months columns.
dateadd("month", int([month]), [cohort_month])
Replace the months
pill in your column shelf with this new calculated field. If it defaults to Continous when you place it on the column shelf, right-click and change it to discrete. This will give you an x-axis that is a date value. On your Marks shelf, remove Measure Name from the color so that the cohort months determine the color of each line.
I tried it with the twbx from your question and this approach worked.
Upvotes: 1