Forum Discussion

jayant91089's avatar
jayant91089
New Member
8 years ago

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

Hi All

 

I have a table similar to the sample pasted below:

tgendercount
0M50
0F40
1M40
1F35
2M31
2F30
3M24
3F22
4M20
4F17
5M15
5F12

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 

 

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    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