Forum Discussion

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

get a value from a column for a specific client based on first and last date

Hi There,

 

I have a table where clients had different appoiments in different dates. At each appoiment they have two scores ( Gad7 and PHQ9).

 

I want to calculate or show another column for each Client ID the GAD7 score and PHQ9 Score at first and last appoiment.

THis is my table.

 

LPTIDAPPOINTMENTPHQ9_SCOREGAD7SCORE
66765312/01/2018 14:304819
66765318/01/2018 15:003420
66765316/01/2018 14:504819
69167706/11/2018 13:005576
69167703/12/2018 09:003323
84287504/01/2018 10:003738
84287518/01/2018 11:003723
84384807/09/2018 18:004042
84384821/09/2018 18:301414
84745505/01/2018 10:003742
84745518/01/2018 12:004038
84875411/10/2018 17:004042
85182125/05/2018 11:005576
85182101/06/2018 13:005166

 

 

And this is my output

 

LPTIDAPPOINTMENTPHQ9 first AppGAD7 first APPPHQ9 Last AppGAD7 last APP
66765312/01/2018 14:3048194819
69167706/11/2018 13:0055763323
84287504/01/2018 10:0037383723
84384807/09/2018 18:0040421414
84745505/01/2018 10:0037424038
85182125/05/2018 11:0055765166
  • Hi, 

    I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.

    All measures are in the attached pbix file.

     

2 Replies

  • Hi, 

    I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.

    All measures are in the attached pbix file.

     

  • v-easonf-msft's avatar
    v-easonf-msft
    Icon for Community Support rankCommunity Support

    Hi, mihaita_baro 

    If your problem has been solved, please mark the helpful replies or add your reply as Answered to close this thread.
    It will help other community members easily find the solution when they get the similar issue.

     

    Best Regards,
    Community Support Team _ Eason