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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

Hold Time between 2 calls

Hello Guys,

I want to calculate the hold time between 2 calls of indiviual source on specific date i mean
suppoose source 602 call date is 1-9-2021  11:16:06 and his end time is 1-09-2021 11:16:37 and source 602 2nd call start at 1-9-2021 11:17:10 i have to calculate the hold time between 1-09-2021 11:16:37 and 1-9-2021 11:17:10 for source 602 and same for 603   please help how to do this
Thanks 
pra137

pra137_0-1636452854694.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

You can try this code to achieve your goal.

Diff =
VAR _CurCallStart = 'Table'[Call Start]
VAR _LastCallEnd =
    CALCULATE (
        MAX ( 'Table'[Call End] ),
        FILTER (
            'Table',
            'Table'[Src] = EARLIER ( 'Table'[Src] )
                && 'Table'[Date] = EARLIER ( 'Table'[Date] )
                && 'Table'[Call End] < EARLIER ( 'Table'[Call End] )
        )
    )
VAR _TIMEDIFF = _CurCallStart - _LastCallEnd
RETURN
    IF ( _LastCallEnd = BLANK (), TIME ( 0, 0, 0 ), _TIMEDIFF )

Result is as below. Note to change the [Diff] column Data type to Time and Format to h:nn:ss.

1.png

Best Regards,
Rico Zhou

 

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
VijayP
Super User
Super User

@Anonymous 
For A all Custom Values are duration between first call to last call

Try this solution and let me know if it helps!

Capture.PNG




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Anonymous
Not applicable

Thank sir but I have to calculate break time between 2 calls I mean 1st call end time is 11:16:37 should be subtract from start time of 2nd call eg 11:16:37-12:16:00

smpa01
Community Champion
Community Champion

@Anonymous  any chance you can provide sample data and desired output clearly?


========================
Did I answer your question? Mark my post as a solution!
Proud to be a Super User
My Custom Visualization Projects
• Plotting Live Sound: Live Sound
• Beautiful News: Women in Parliament, Energy Mix, Shrinking Armies
• Visual Capitalist: Working Hrs
• Others: Easing Graph, Animated Calendar
MayViz Submissions
• Week 1: View
• Week 2: View
========================
Anonymous
Not applicable

I want  result like diff column in below pic

IMG-20211110-WA0000.jpg

Anonymous
Not applicable

Hi @Anonymous 

You can try this code to achieve your goal.

Diff =
VAR _CurCallStart = 'Table'[Call Start]
VAR _LastCallEnd =
    CALCULATE (
        MAX ( 'Table'[Call End] ),
        FILTER (
            'Table',
            'Table'[Src] = EARLIER ( 'Table'[Src] )
                && 'Table'[Date] = EARLIER ( 'Table'[Date] )
                && 'Table'[Call End] < EARLIER ( 'Table'[Call End] )
        )
    )
VAR _TIMEDIFF = _CurCallStart - _LastCallEnd
RETURN
    IF ( _LastCallEnd = BLANK (), TIME ( 0, 0, 0 ), _TIMEDIFF )

Result is as below. Note to change the [Diff] column Data type to Time and Format to h:nn:ss.

1.png

Best Regards,
Rico Zhou

 

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

VijayP
Super User
Super User

@Anonymous 

to get the result as below use this file

 

Capture.PNG




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Anonymous
Not applicable

Thanks but it shows time between call I want the hold time between 2 calls 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.