Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello folks, I've gotten some great advice, help, and tips from you in the past and I was hoping you could help again.
I have a dataset where I need to count distinct "appointments". The problem is, sometimes those appointments are sometimes on two people's calendars at the same time, and only count as one visit.
What I'm looking for is a way to say: if there is more than one appointment on a calendar day with the same subject ID (unique value), only count ones assigned to a particular group (already configured the groups).
I started creating a measure, but I didn't get far.
I know it will probably be some combination of COUNT and FILTER, but I'm struggling to find the right one.
Let me know if I can clarify anything.
Thank you for taking the time!
Solved! Go to Solution.
Hi @Anonymous ,
Please try this code:
COUNT MEASURE =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Appointments] ),
FILTER ( ALLSELECTED ( 'Table' ), [group] = SELECTEDVALUE ( 'Table'[group] ) )
)
If you need more help, please provide some example data and expect result.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Please try this code:
COUNT MEASURE =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Appointments] ),
FILTER ( ALLSELECTED ( 'Table' ), [group] = SELECTEDVALUE ( 'Table'[group] ) )
)
If you need more help, please provide some example data and expect result.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous can you share a sample data and write here what ia the desired result
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 98 | |
| 72 | |
| 50 | |
| 50 | |
| 43 |