Forum Discussion

axarhaan's avatar
axarhaan
Icon for Helper I rankHelper I
4 years ago

Calculate Retention Rate in given date window

Hello y'all,

 

I am stuck to calculate the retention rate for a given date range. Any help is highly appreciated.

 

I have a list to participants who finished there 1st screening on a particular date and now they have to come again for a follow up visit in a given date range/window. If they visit in that date range then we will mark them as "Attended on time" but if they visited out of that date range then we will mark them "Out of window".  If they don't attend at all then we mark them "Lost to follow up".

This rule applies to 6 week follow up and 6 month follow up visit. See below the dataset:

 

I want to calculate the retention rate of how many participant attended "on time"  within the date range, how many attended "out of range" and how many we "lost to follow up". 

 

The major thing to consider here is: they have to have attend within the given date range.

 

Record IDScrenning Completed6week windowAppointment completed6 week Status6 month window6mnth Appointment completed
110/4/202110/4/2021-11/15/202110/29/2021Attended on time2/21/2022-5/16/2022 
210/14/202110/14/2021-11/25/202110/26/2021Attended on time3/3/2022-5/26/2022 
310/14/202110/14/2021-11/25/202110/26/2021Attended on time3/3/2022-5/26/2022 
410/14/202110/14/2021-11/25/202111/29/2021Out of Window3/3/2022-5/26/2022 
510/14/202110/14/2021-11/25/2021 Lost to follow up3/3/2022-5/26/2022 
610/14/202110/14/2021-11/25/2021 Lost to follow up3/3/2022-5/26/2022 

 

Any help is highly appreciated.

 

Thanks.

 

7 Replies

  • axarhaan , Based on what I got

    a New column =

    Switch(True() ,

    isblank([Appointment completed]) , today() >= [Screening Completed]  +42, "Lost to follow up" ,

    isblank([Appointment completed]) , today() <= [Screening Completed]  +42 ,"Appointment due" //You need to correct this

    [Appointment completed] >= [Screening Completed] +42  , "Out of Window",

    [Appointment completed] <= [Screening Completed] +42  , "Attended on Time"

    )

    • axarhaan's avatar
      axarhaan
      Icon for Helper I rankHelper I

      amitchandak Thank you for your reply. I am new to power bi and still learning. I am getting an error.

      Can you please explain or tell me the solution for this please or how to fix it.  Thanks.

       

       

      • Samarth_18's avatar
        Samarth_18
        Icon for Community Champion rankCommunity Champion

        Hi axarhaan ,

         

        Just small change on what Amit suggested. Try like below:-

        column = 
        
        Switch(True() ,
        
        isblank([Appointment completed]) && today() >= [Screnning Completed]  +42, "Lost to follow up" ,
        
        isblank([Appointment completed]) && today() <= [Screnning Completed]  +42 ,"Appointment due",
        
        [Appointment completed] >= [Screnning Completed] +42  , "Out of Window",
        
        [Appointment completed] <= [Screnning Completed] +42  , "Attended on Time"
        
        )

         

        Thanks,

        Samarth

         

  • Samarth_18 Hey Samarth.... Thanks for the reply.... Yes, it worked great.... Thank you for your help.... I have 1 last question, sorry for that....

    Can we differentiate those record ids as a group... like what if I want to show that record id 1 and 3 was in group 1 and record id 2 & 4 was in group 2 and so on so forth...  so that I can show the graphs by groups that how many attended on time in group 1 and how many lost in that group.... something like that...

     

    Also your solution worked to get the status of 6 week but then how to get the 6 month window... Please advice as I am new to this..

     

    Check below the sample dataset... Your help is greatly appreciated... 

     

    GroupsRecord IDScrenning Completed6week windowAppointment completed6 week Status6 month window6mnth Appointment completed
    Group 1110/4/202110/4/2021-11/15/202110/29/2021Attended on time2/21/2022-5/16/2022 
    Group 2210/14/202110/14/2021-11/25/202110/26/2021Attended on time3/3/2022-5/26/2022 
    Group 2310/14/202110/14/2021-11/25/202110/26/2021Attended on time3/3/2022-5/26/2022 
    Group 3410/14/202110/14/2021-11/25/202111/29/2021Out of Window3/3/2022-5/26/2022 
    Group 1510/14/202110/14/2021-11/25/2021 Lost to follow up3/3/2022-5/26/2022 
    Group 3610/14/202110/14/2021-11/25/2021 Lost to follow up3/3/2022-5/26/2022 
    • Samarth_18's avatar
      Samarth_18
      Icon for Community Champion rankCommunity Champion

      axarhaan , Could you please share the condition on what basis grouping need to done?

      • axarhaan's avatar
        axarhaan
        Icon for Helper I rankHelper I

        Samarth_18 The idea behind grouping is to see the retention rate of each group... like in each group there are 10 participants and we need to compare which group has highest retention rate or appointment attendence rate and the lowest retention rate... its like to keep a track of participants who are attending and not attending by group....