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.
I need to create a follow-up with patient roster that displays all patients within a date range who have only had 1 visit / appointment.
My hope was to create a calculated column that displayed the number of visits for each patient then create another column that was a is a flag for people with only 1 visit. Here is the dax I'm using to create the first column...its NOT working...it displays all visits per patient
*PatientsWithOneVisit = CALCULATE(DISTINCTCOUNT(MERGE_PatientData[patientid]),
FILTER(VALUES('MERGE_PatientData'[service date]),CALCULATE(COUNTROWS('MERGE_PatientData')=1)))
The end goal is a tabular roster
Patient ID Name Last Service Date Visit Count Red Flag (for 1 visit)
00110011 Morris 2/01/2022 6
00220033 Jones 12/01/2021 1 X
00110044 Stevens 10/01/2022 3
00220022 Albre 04/01/2021 1 X
Solved! Go to Solution.
Unfortunately as this is medical data I cannot share the file. However, a work around has been put into place so I will mark this as closed.
Thanks
Unfortunately as this is medical data I cannot share the file. However, a work around has been put into place so I will mark this as closed.
Thanks
Hi @anwilkins,
Can you please share a pbix or some dummy data that keep raw data structure with expected results? It should help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly
Notice: please remove sensitive data before sharing.
Regards,
Xiaoxin Sheng
Hi Datavisuserpbi, I tried this and the results are blank
Hello,
Try this:
Can you please post sample data of the fact table or a sample PBIX file (hopefully...)?
Proud to be a Super User!
Paul on Linkedin.
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 |
---|---|
107 | |
94 | |
77 | |
63 | |
50 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |