Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi, I am completely new to power bi. I have a table with appointments for customers by their id. each id number can have multiple appointment dates.
i am trying to find the number of days since the last appointment the patient had and their next appointment.
Please tell me how I can achieve that. Thank you.
Solved! Go to Solution.
Hi,
Hope this helps.
data | results | ||||||||
id | date | id | days from last appointment to today | ||||||
101 | 8/20/2019 | 101 | 7 | ||||||
101 | 8/21/2019 | 102 | 32 | ||||||
101 | 8/22/2019 | 103 | 62 | ||||||
101 | 8/29/2019 | ||||||||
102 | 8/24/2019 | ||||||||
102 | 8/25/2019 | ||||||||
102 | 9/26/2019 | ||||||||
103 | 8/27/2019 | ||||||||
103 | 8/28/2019 | ||||||||
103 | 8/29/2019 | ||||||||
103 | 10/30/2019 | ||||||||
Something along the lines of this basically
Hi,
Hope this helps.
Thank you so much. Just a a follow up though, some of the tables only had one date and so the numbers are huge, like 43000. How can I add the condition that if 2ndlastday does not exist, then do not subtract or maybe just return the date?
Hi,
Try this measure
=IF(ISBLANK([Second last date]),BLANK(),[Days since previous appointment])
Hi,
Share some data and show the expected result.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |