Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jayant91089
New Member

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:

equation.PNG

 

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 1
v-shex-msft
Community Support
Community Support

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}

3.PNG

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

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.