cancel
Showing results for
Did you mean:
Occasional Visitor

Creating a plot of retention/persistence (in general, cummulative distribution function)

Hi All

I have a table similar to the sample pasted below:

 t gender count 0 M 50 0 F 40 1 M 40 1 F 35 2 M 31 2 F 30 3 M 24 3 F 22 4 M 20 4 F 17 5 M 15 5 F 12

Each row has a time field t, a count field and several other fields describing population characteristics (i have only included gender in this dummy example). The count field gives the number of subscribers with given characteristics that were retained beyond time t.

I want to plot percentage of time t=0 subscribers that were retained beyond a particular time t as a function of t. Population characteristics are to go into slicers. In more mathematical terms, I want:

The issue I am having is as follows:

Every time a selection of population characteristics is made in the slicers, the total time t=0 population (denominator in above equation) with those characteristics changes. So far I have been able to create measures for each time t* in {0,1,2,3,4,5} that give the correct value, which I can then show on a card. However I would like to actually plot p[t*,slice] vs t*, which is where I am stuck.

Is there some way to create measure that has a different value for different t* and plot it? Or should I be rearranging the table in some way?

Thanks

Community Support Team

Re: Creating a plot of retention/persistence (in general, cummulative distribution function)

Hi @jayant91089,

Current Dax functions seems not suitable for your calculate logic. Actually, data model not contains any index to find out the specific value.
Maybe you can try to write power query function to achieve your requirement, it support to use column name and row index to find out specific value.

Sample:

`Value = 'Query Name'['Column Name']{Index-1}`

Above formula will find out the 6th 'count' column value.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, please consider Accept it as the solution to help the other members find it more quickly
Learning resources: Power BI

Announcements

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors