Forum Discussion
Count Values from other Table only once
Hello - i ran into a Problem in Power BI after trying a lot.
I have a big Table containing Appointments.
The Start- and End- Times are indicated by numbers from 0 to 95 (for each 15-Minute Block from 00:00 to 23:45).
Columns:
Date
StartTime
EndTime
ExamRoom
Doctor
and others...
I want to calculate the Duration of the daily Worktime for each Doctor without counting his booking in two ExamRooms at the same timeslot twice.
Groupby / SUMX counts every booking in every room - thats where i got stuck.
Anybody has an Idea?
I already created a Table with the TimeIndexes from 0 to 95 but i can't figure out
- how to count for each day
- for each timeslot
- if there is one or more appointments for the doctor in the appointments-table
- and counting this as 1 or 0
1 Reply
- CahabaData
Memorable Member
You will need to define which value (or calculation) in a record will flag the surviving record when there is more than 1 record per doctor booking per day.
This definition is needed up front to then best decide how to implement the best filter.