Forum Discussion
Mamoun_issa
6 years agoFrequent Visitor
Same patients visit in same day
Hello
I Have patients visits schedule that have the details of the visits and the procedure done in each visits, I neet to diffrentiate visits that have same day visit the data look something like this
| Visit Number | Patient Name | Patient Number | Visit Date | Procedures Doen | Visit Type |
| 1001 | Joseph | MR200 | 10 Januray 2019 | A | OP |
| 1001 | Joseph | MR200 | 10 Januray 2019 | B | OP |
| 1001 | Joseph | MR200 | 10 Januray 2019 | C | OP |
| 1012 | Joseph | MR200 | 10 Januray 2019 | X | IP |
| 1012 | Joseph | MR200 | 10 Januray 2019 | Y | IP |
| 1012 | Joseph | MR200 | 10 Januray 2019 | Z | IP |
I want to add a coulmn to specify wethed patient have a visit in the same day or not
Regards,
Hi Mamoun_issa ,
Please try this:Same Day = CALCULATE ( DISTINCTCOUNT ( myTable[Visit Number] ), ALLEXCEPT ( myTable, myTable[Patient Number], myTable[Visit Date] ) )
1 Reply
- Nathaniel_CCommunity Champion
Hi Mamoun_issa ,
Please try this:Same Day = CALCULATE ( DISTINCTCOUNT ( myTable[Visit Number] ), ALLEXCEPT ( myTable, myTable[Patient Number], myTable[Visit Date] ) )