Forum Discussion

mouzzampk's avatar
mouzzampk
Copper Contributor
Nov 17, 2023

Count Serial if Outgoing Reps Time is between Sign In Start and Finish Time

Hi, 

I have four tables

Outgoing Reps

Sign In

Calendar

Officer

 

Calendar and Officer are dimension tables and Outgoing Reps and Officer are linked to Calendar and Officer table.

 

I am looking for a DAX solution to "Count PCN if Outgoing Reps Time is between Sign In Start and Finish Time"

 

Sign In

 

Date                  Officer    Start         Finish        O/T Start    O/T Finish

23/10/2023  User 1    08:50:00  15:00:00  04:30:00  06:30:00
26/10/2023  User 2  08:00:00  16:00:00  06:45:00  07:45:00
26/10/2023  User 3    16:00:00  18:00:00
27/10/2023  User 4  08:00:00  16:05:00  06:45:00  07:45:00
27/10/2023  User 1  08:00:00  16:05:00  06:45:00  07:45:00

 

Outgoing Reps

 

Serial              Date             Time         Officer

EA13243243  02/03/2023  07:08:00  User 1
EA13243244  05/03/2023  21:40:00  User 1
EA13243245  05/03/2023  07:12:00  User 2
EA13243246  05/03/2023  15:26:00  User 3
EA13243247  09/03/2023  13:05:00

  User 3

EA13243248  09/03/2023  13:50:00  User 4

 

I am looking for DAX functon to Count number of Serial recorded by Officers during Normal Hours and O/T Hours from Sign In Sheet.

 

Expected Outcome

 

Normal Hours            O/T Hours

20                               15

 

I hope this gives more information.

 

Thank you

Resources