Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Mamoun_issa
Frequent Visitor

Number of Patient Visits in same Day

Hello,

 

I Have a schedule of patients visits that looks similar to this:

 

Visit IDPatient NamePatient Number (MRN)Procedures MadeVisit DateAmount
1001JoesphMR50003A1 January 2019100
1001JoesphMR50003B1 January 201950
1001JoesphMR50003C1 January 201920
1020JoesphMR50003X1 January 2019500
1020JoesphMR50003Y1 January 201960
1020JoesphMR50003Z1 January 2019250

 

I want to add a column to classify wethed this patient have a visit in the same day 

1 ACCEPTED SOLUTION
Thim
Resolver V
Resolver V

Hopefully someone who knows how to add this to your current matrix answers you.

I could not find a perfect answer, but i do have a different solution.

 

first add this meassure

Revisit = IF(DISTINCTCOUNT('Table'[Visit ID])=1;"No";"Yes")
 
Then make a new matrix with the following columns.
Patient Name,
Patient Number (MRN),
Visit Date,
and your new meassure. (Revisit)
 
Your final result should look like this. (I added a few extra dates in your example data, to test a bit)
 
Revisit.PNG
 
Hope this will help. 🙂
 

View solution in original post

2 REPLIES 2
dax
Community Support
Community Support

Hi Manoun_issa,

You could refer to @Thim 's suggestions, if this is not what you want, please inform me more detailed information (such as your sample data and youir expected output). Then I will help you more correctly.

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thim
Resolver V
Resolver V

Hopefully someone who knows how to add this to your current matrix answers you.

I could not find a perfect answer, but i do have a different solution.

 

first add this meassure

Revisit = IF(DISTINCTCOUNT('Table'[Visit ID])=1;"No";"Yes")
 
Then make a new matrix with the following columns.
Patient Name,
Patient Number (MRN),
Visit Date,
and your new meassure. (Revisit)
 
Your final result should look like this. (I added a few extra dates in your example data, to test a bit)
 
Revisit.PNG
 
Hope this will help. 🙂
 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.