patient_id treatment_date
100 4/28/2018
100 4/27/2019
100 4/29/2019
100 6/22/2019
101 3/6/2021
101 1/1/2022
101 4/6/2022
102 6/2/2017
102 6/6/2018
102 10/7/2018
102 9/4/2021
102 6/2/2022
Hi everyone,
I have a table which recorded the date when the patients came back for treatment as shown in the data above. I want to calculate the number of days from the first treatment (first date) for their subsequent treatment for each and every patient.
The expected outcome is shown in the screenshot above in the 3rd column days_from_first_treatment. I'm fine with either using DAX or Power query. Any help or advise will be greatly appreciated!


