Forum Discussion

mihaita_baro's avatar
mihaita_baro
Icon for Helper II rankHelper II
4 years ago

KPI's / Milestone formulas

Hi guys,

 

I have a table called "Appointment" where i keep all the appointment/reviews a patient had and i need to calculate 3 milestones / KPI's for each patient. It can be through a new calculated column or measure.

 

- first one is KPI4 ( column in green ) which i have calculated,  no need for this one and is based on the following

First Review Date when client's
- Session Type is one of the following: Treatment; Assessment and Treatment; Review and Treatment;

2,3,5 from Appoiment.apptype
And
- Attendance Status is one of the following: On time/ahead of staff; Late, was seen;

 

- Second one is called KPI5 and have the following criteria

 

KPI5 date = Sign Off Date . If there is a sign off date
Clients must have at least 2 reviews meeting the following criteria:
- Session Type is one of the following: Treatment; Assessment and Treatment; Review and Treatment;
And
- Attendance Status is one of the following: On time/ahead of staff; Late, was seen; or Blank (has not been filled in on DCRS);

 

basically is at least 2 sessions eligible for KPI4 but with a sign off date 

 

I have done something here but it doesn't calculate properly

 

"

KPI5 FTB Eligible =
VAR a =
    IF (
        COUNTX ( FILTER ( ALL ( 'Appointment_FTB' ), [clientId] = EARLIER ( 'Appointment_FTB'[clientId] ) && 'Appointment_FTB'[assessmentsId] =EARLIER('Appointment_FTB'[assessmentsId]) ), [clientId] ) >= 2,
        1
    )
RETURN
    IF (
        a = 1
            && 'Appointment_FTB'[sessionType]
                    IN { "Assessment and Treatment", "Treatment", "Review and Treatment"}
                    && 'Appointment_FTB'[attendedStatus] IN { "On time / ahead of staff", "Late, was seen" } && 'Appointment_FTB'[SignOffDate]<>BLANK(),
        1
    )"

 

 

- Third one is KPI6 and have the following criteria.

 

Must meet criteria for KPI5. In addition:
Clients must score revgad7anxiety_Result_raw>7 or revphq9depression_Result_raw>9 at Initial Review and
score revgad7anxiety_Result_raw<8 and revphq9depression_Result_raw<10 at Final Review (last review being the latest one with PHQ and GAD assessment); 

 

The output should be something like in the below screenshot. Not necesarily to be done via calculated column, can be a measure as well

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi mihaita_baro ,

     

    Have trouble to follow, can you share the logic and the expected result?

     

    Best Regards,

    Jay

    • mihaita_baro's avatar
      mihaita_baro
      Icon for Helper II rankHelper II

      Hi Anonymous 

       

      I have updated my first post with more explanations and the expected restults, let me know your ideeas.