3 Replies Latest reply on Aug 29, 2018 5:24 PM by Okechukwu Ossai

    retention curve by initial start month over time, not by retention over time by initial start month

    Scott Laronge

      Hey all,


      I've got a SQL query that eventually outputs monthly retention by N months and by initial cohort date.  The calcs are done in SQL because it's easier than loading in a few million rows into Tableau and doing the calculations on a per user basis within the app.


      I'm able to make a graph in Tableau & in Excel/Sheets that shows m1, m2, m3, mN retention with the initial cohort month as the X-axis.  However, my internal customers want the x-axis to be the m1, m2, mN cohort to be the x-axis and the date to be grouped by the initial cohort month.


      In Excel/Sheets I can swap rows/columns and the graph I want is created quite easily.  However if i do the same in Tableau the horizontal graph just turns into a vertical graph, which isn't what I want.  Transposing the initial data lets me build a table that I want, but when I try to graph it the x-axis goes null because "m1_cohort_month" isn't a "time" and isn't graphed properly in Tableau.


      Any idea how I can either prep my data differently or generate the viz I'd like?


      Workbook with sample dataset attached.