Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello Team,
I want to calculate the idle time between 2 consecutive calls callusing Dax measure may be Dax Calculated column.
Please help
The sample table is given below
Thanks
Reply
Hello
Thanks for your response, we are looking ideal time between 2 completed call
like
Start date time for current call - end call of previous call
but the numbers shared in the snapshot by you are completely different. Please correct me if I am wrong
After running your Dax I got the following error. though I using best in class system configuration
Please HELP!!!!!
Solved! Go to Solution.
Thanks for the reply from @Greg_Deckler , please allow me to provide another insight.
Hi @mehul_sharma77 ,
First create an index column.
How to Add Index Column in Power BI (DAX) - Zebra BI
Then use the following DAX to create the idle time calculated column.
IdleTime =
VAR endCall =
MAXX (
FILTER ( 'Call', 'Call'[Index] = EARLIER ( 'Call'[Index] ) - 1 ),
'Call'[CallEndDateTime]
) //end date of previous call
VAR currentCall = 'Call'[CallStartDateTime] //Start date time for current call
RETURN
DATEDIFF ( endCall, currentCall, SECOND ) //Displays the difference between two dates in seconds.
IdleTime column displays the difference (in seconds) between the start date of the current call and the end date of the previous call
Please see the attached pbix for reference.
Best Regards,
Dengliang Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the reply from @Greg_Deckler , please allow me to provide another insight.
Hi @mehul_sharma77 ,
First create an index column.
How to Add Index Column in Power BI (DAX) - Zebra BI
Then use the following DAX to create the idle time calculated column.
IdleTime =
VAR endCall =
MAXX (
FILTER ( 'Call', 'Call'[Index] = EARLIER ( 'Call'[Index] ) - 1 ),
'Call'[CallEndDateTime]
) //end date of previous call
VAR currentCall = 'Call'[CallStartDateTime] //Start date time for current call
RETURN
DATEDIFF ( endCall, currentCall, SECOND ) //Displays the difference between two dates in seconds.
IdleTime column displays the difference (in seconds) between the start date of the current call and the end date of the previous call
Please see the attached pbix for reference.
Best Regards,
Dengliang Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@mehul_sharma77 See my article on Mean Time Between Failure (MTBF) which uses EARLIER: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/3395....
The basic pattern is:
Column =
VAR __Current = [Value]
VAR __PreviousDate = MAXX(FILTER('Table','Table'[Date] < EARLIER('Table'[Date])),[Date])
VAR __Previous = MAXX(FILTER('Table',[Date]=__PreviousDate),[Value])
RETURN
( __Current - __Previous ) * 1.
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!