Forum Discussion
RemiAnthonise
6 years agoHelper V
DistinctCount per startdate
Hi, I have the following issue: For a hospital I'm creating some dashboards. I want to calculate the amount of incoming patients per day. So, a patient comes in today at 3-12-2019 and stays for ...
RemiAnthonise
6 years agoHelper V
Hi v-xicai Amy,
Sorry to bother you with this but if you have time to check my issue, I'd really appreciate it.
Thanks.
RemiAnthonise
6 years agoHelper V
Hi v-xicai or someone else:
I'm getting close to the deadline I have for this report and I haven't found the solution yet. Can you help me with this one?
Thanks!
- v-xicai6 years agoCommunity Support
Hi RemiAnthonise ,
You can create measure like DAX below.
Count= SUMX ( SUMMARIZE ( Table1, Table1[Patient Code], Table1[Patient ID], "Result", Var d= CALCULATE(DISTINCTCOUNT(Table1[Patient ID]), FILTER(ALLSELECTED(Table1), Table1[Patient Code]=MAX(Table1[Patient Code]))) Return IF(d>=2, d+1,d) ), [Result] )Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.