Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
pstew12
Frequent Visitor

Get max concurrent call count by the hour

Hi Everyone,

 

I have call logs where I am trying to find the overlapping calls to figure out the max concurrent calls I have every hour. 

 

Data Example:

JoinTimeLeaveTime
3/8/18 8:01 AM3/8/18 9:38 AM
3/8/18 8:04 AM3/8/18 9:38 AM
3/8/18 9:03 AM3/8/18 9:39 AM
3/8/18 9:09 AM3/8/18 9:39 AM
3/8/18 9:23 AM3/8/18 9:29 AM
3/8/18 9:23 AM3/8/18 9:29 AM
3/8/18 9:30 AM3/8/18 9:56 AM

 

What I need to come up with is the following

Hour of day (24hr)Max Calls
01
12
22
38
42
53
67
70
84
94
103
113
124
133
145
153
163
173
184
195
204
213
222
233

 

Any ideas to point me in the right direction? I don't even know where to start.

 

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

@pstew12 ,

 

Firstly generate a 24h series table using dax:

Hours = GENERATESERIES(0, 23, 1)

Then you can create a table like below, you can add other conditions in the switch expression.

Result Table = 
SELECTCOLUMNS (
    Hours,
    "Hour of day(24hr)", Hours[Value],
    "Max Calls", SWITCH (
        Hours[Value],
        8, CALCULATE (
            COUNTROWS ( 'Table' ),
            FILTER (
                'Table',
                NOT (
                    HOUR ( 'Table'[JoinTime] ) >= 9
                        || HOUR ( 'Table'[LeaveTime] ) < 8
                )
            )
        ),
        9, CALCULATE (
            COUNTROWS ( 'Table' ),
            FILTER (
                'Table',
                NOT (
                    HOUR ( 'Table'[JoinTime] ) >= 10
                        || HOUR ( 'Table'[LeaveTime] ) < 9
                )
            )
        )
    )
)

Capture.PNG

 

Please also refer to the pbix file attached.

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

7 REPLIES 7
Syndicate_Admin
Administrator
Administrator

Hello @pstew12!

I am currently encountering the same problem you had, I need to calculate the maximum number of simultaneous calls for each hour of the day. Did you manage to get it out?

Thanks in advance.

Greetings,

Bibi

v-yuta-msft
Community Support
Community Support

@pstew12 ,

 

Firstly generate a 24h series table using dax:

Hours = GENERATESERIES(0, 23, 1)

Then you can create a table like below, you can add other conditions in the switch expression.

Result Table = 
SELECTCOLUMNS (
    Hours,
    "Hour of day(24hr)", Hours[Value],
    "Max Calls", SWITCH (
        Hours[Value],
        8, CALCULATE (
            COUNTROWS ( 'Table' ),
            FILTER (
                'Table',
                NOT (
                    HOUR ( 'Table'[JoinTime] ) >= 9
                        || HOUR ( 'Table'[LeaveTime] ) < 8
                )
            )
        ),
        9, CALCULATE (
            COUNTROWS ( 'Table' ),
            FILTER (
                'Table',
                NOT (
                    HOUR ( 'Table'[JoinTime] ) >= 10
                        || HOUR ( 'Table'[LeaveTime] ) < 9
                )
            )
        )
    )
)

Capture.PNG

 

Please also refer to the pbix file attached.

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

I dont want to count mutually exclusive count repeatedly. For eg. if there are mutually exclusive calls like

C1 from 8:00 to 8:05 ,

C2 from 8:06 to 8:10 

C3 from 8:11 to 8:15.

 

By the method explained above for 8, it will give count =3 but I want the count as 1 

i.e. excluding mutually exclusive calls because they will be sharing the resource or license

Ok, If I want to filter by date how can I make this dynamic?

 

@pstew12 ,

 

I'm afraid this couldn't be achieved because power bi doesn't support dynamic calculate table.

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Community Champion
Community Champion

You need something like Open Tickets:

https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/td-p/409364

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thats helpful but how can I do it over a 24 hour period? 

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors