4 Replies Latest reply on Mar 17, 2016 12:44 PM by Kent Sloan

# How to create continuous graph from multiple measures (specifically, retention curve)

Hi all,

I have a dataset that flags whether a user showed up on a specific day after they first used an app. So I have individual measures for day 1-7, day 14 and  day 28 retention that looks like this:

 Id Type D0 D1 D14 D2 D28 D3 D4 D5 D6 D7 0 b 1 0 0 1 0 1 0 0 0 0 1 a 1 1 0 0 0 0 0 0 0 0 2 c 1 1 0 0 0 1 0 0 0 0 3 b 1 0 0 1 0 0 0 0 0 0 4 c 1 1 0 0 0 0 1 0 0 0 5 c 1 1 0 0 0 0 0 1 0 0 6 c 1 0 0 0 0 1 0 0 0 0 7 b 1 1 0 0 0 0 0 1 0 0 8 a 1 0 0 1 0 0 0 0 0 0 9 b 1 1 0 1 0 1 0 0 0 0

I want to get a comparison of retention by type. But instead of a simple Measure Names/Values table like this:

 Type Avg. D1 Avg. D2 Avg. D3 Avg. D4 Avg. D5 Avg. D6 Avg. D7 Avg. D14 Avg. D28 a 50.61% 35.59% 24.90% 20.26% 0.1762 0.1461 13.49% 10.39% 10.23% b 50.53% 31.78% 24.45% 19.22% 0.1629 0.1426 11.66% 11.16% 10.03% c 50.32% 33.41% 24.59% 20.00% 0.1679 0.1395 11.84% 11.06% 10.55%

I want a graph, that shows the different retention curves overlaid, preferably with days filled out all the way to day 28 (excel'd):

I haven't been able to figure out a way to do it. Anyone have an idea?

I've attached an example workbook with dummy data similar to my own.

Thanks!

• ###### 1. Re: How to create continuous graph from multiple measures (specifically, retention curve)

HI

Use Pivot option in tableau to achieve that.

1 of 1 people found this helpful
• ###### 2. Re: How to create continuous graph from multiple measures (specifically, retention curve)

Hi Kyle,

The main problem is that you do not have the right data structure for Tableau to do what you are looking for. You can use the Pivot feature to restructure your data set to get what you are looking for. I also have attached an updated version of your workbook with what you are trying to do. To get the axis to run from 1-30 instead of skipping from 14 to 18 I converted the labels D1-D28 into dates to get a continuous axis.

Here is a link on how to use pivot

Pivot Data (from Columns to Rows)

• ###### 3. Re: How to create continuous graph from multiple measures (specifically, retention curve)

This is great, thanks! So it looks like if I pivot my dataset, it will not allow me to also use the data as it is currently structured? Since I have other other calculations and views based off the current structure, do I need to have 2 versions of the same datasource? One pivoted, one not?

• ###### 4. Re: How to create continuous graph from multiple measures (specifically, retention curve)

Hi Kyle,

I would check to see if there is a way to build the other views with the new data structure first. If not you would need 2 data sets.

Thanks,

Kent