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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
keivan
Helper I
Helper I

Reconnection rate -

Hi all,

I would like to calculate reconnection rate.
My dataset is compose in this way:

 

Calendar Table (Date, Year, Month, etc.)
Connections Table (connection_id, etc.)
Consents Table (consent_id, connection_id, valid_until, etc.)

 

When a client create a connection (connection_id 1111) he provide a consent (consent_id 2222) this consent has an expiration date (for example 25/08/2022). When this consent expire the client can renew the consent for its connection. 
If the client renew the consent, a new consent_id will be generate (consent_id 3333) but the connection_id would NOT change (connection_id 1111).

I had already calculate a formula to find out the

Last Consent Expiration Date = 

CALCULATE (
MAX (consents[consent_valid_until] ),
FILTER (
Consents,
consents[connection_business_id] = MAX ( Connections[connection_business_id] )
)
)


However when I try to transform it in a boolean I got always 0 values 

Active Connection = 

VAR _active =

CALCULATE (
MAX (consents[consent_valid_until] ),
FILTER (Consents,
consents[connection_business_id] = MAX ( Connections[connection_business_id] )
)
)
RETURN
IF ( _LASTDATE >= TODAY (), 1, 0 )

What I actually want to do is to calculate Renewal rate.
So for those connection in which the consent is expired by at least 14 days, I want to check if a new consent has been created. So if a renewal was perform.

I don't know how to do that 😞 
3 REPLIES 3
Greg_Deckler
Super User
Super User

@keivan Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Thanks Greg, 
I checked but I did not find this specific topin on most popular questions.
I would always add table in future.

here more info:
date are in format yyyy-mm-dd hh:mm:ss.000

consent_business_idconnection_business_idconsent_statusconsent_creation_dateconsent_creation_date_1consent_valid_untilconsent_okconsent_newconsent_fail
112ok2022-09-05 12:00:00.0002022-09-052022-12-04 12:00:00.000100
152ok2022-12-06 05:54:20.0002022-12-062023-03-06 05:54:20.000100
1269ok2022-08-06 08:42:15.0002022-12-062022-11-04 08:42:15.000100
1669new2022-08-09 08:42:15.000  010
1777fail2022-12-06 05:53:16.000  001

 

 

as you may see for connection_business_id = 2 a connection was created on 5th Sept. it expired after 90 days (consent_id = 11). Then it was renew (consent_id = 15).

connection_id = 69 after the first consent = 12 expired, an attempt of renewal begun but it fail. consent_status = fail.

What I want to get is a KPI, reporting the % of how many conenctions are renew. So I want to take into consideration only consent ok and expired by at least 14 days (to give people time to renew).

where consent_status = 'ok' and consen_valid_until < TODAY() -14

Then in this specific case
consent_renewal % = 2/2 = 100%. Out of the 5 consents only 3 are ok and only 2 are expired by more than 14 days (consent_id 11 and 12)

consent_renewal_success % = 1/2 = 50% Out of 2 renewal only 1 is with consent_status_ok (consent_id = 15) 

Pleas elet me know if it is clear or still confusing the question.
Thanks,

Hi @Greg_Deckler 

did you had chance to take a look?

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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