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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors