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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
mehul_sharma77
Regular Visitor

How to calculate idle time between to calls

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 

mehul_sharma77_1-1728556195273.png

 

Thanks 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for the reply from rajendraongole1 , please allow me to provide another insight: 


Hi  @mehul_sharma77 ,

You can try the following dax, using the var() formula to store the result instead of earlier():.

Solved: Not enough memory to complete this operation - Microsoft Fabric Community

result =
var _start='Table'[CallStartDateTime]
var _date=
MAXX(
    FILTER('Table',
    'Table'[CallStartDateTime]<_start),[CallEndDateTime])
RETURN
DATEDIFF(
   _date, [CallStartDateTime],SECOND)

vyangliumsft_0-1728974769011.png

Depending on the error message indicating that you are experiencing memory problems, consider reducing the amount of data being processed or optimizing the data model. You can also use tools such as DAX Studio to analyze and optimize DAX queries.

DAX Studio | DAX Studio

Use Performance Analyzer to examine report element performance in Power BI Desktop - Power BI | Micr...

Try increasing memory management cache and clear currently used cache under Options. Then restart Power BI Desktop to see if the error disappears. 

vyangliumsft_1-1728974769031.png

This is the related document, you can view this content:

Solved: Not enough memory to complete this operation - Page 2 - Microsoft Fabric Community

Solved: There is not enough memory to complete this operat... - Microsoft Fabric Community

There's Not Enough Memory To Complete This Operati... - Microsoft Fabric Community

 

Best Regards,

Liu Yang

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

5 REPLIES 5
Anonymous
Not applicable

Thanks for the reply from rajendraongole1 , please allow me to provide another insight: 


Hi  @mehul_sharma77 ,

You can try the following dax, using the var() formula to store the result instead of earlier():.

Solved: Not enough memory to complete this operation - Microsoft Fabric Community

result =
var _start='Table'[CallStartDateTime]
var _date=
MAXX(
    FILTER('Table',
    'Table'[CallStartDateTime]<_start),[CallEndDateTime])
RETURN
DATEDIFF(
   _date, [CallStartDateTime],SECOND)

vyangliumsft_0-1728974769011.png

Depending on the error message indicating that you are experiencing memory problems, consider reducing the amount of data being processed or optimizing the data model. You can also use tools such as DAX Studio to analyze and optimize DAX queries.

DAX Studio | DAX Studio

Use Performance Analyzer to examine report element performance in Power BI Desktop - Power BI | Micr...

Try increasing memory management cache and clear currently used cache under Options. Then restart Power BI Desktop to see if the error disappears. 

vyangliumsft_1-1728974769031.png

This is the related document, you can view this content:

Solved: Not enough memory to complete this operation - Page 2 - Microsoft Fabric Community

Solved: There is not enough memory to complete this operat... - Microsoft Fabric Community

There's Not Enough Memory To Complete This Operati... - Microsoft Fabric Community

 

Best Regards,

Liu Yang

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

mehul_sharma77
Regular Visitor

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 

mehul_sharma77_0-1728557968218.png

After running your Dax I got the following error.though I using best in class system configuration 

mehul_sharma77_1-1728558141923.png

Please HELP!!!!!

Hi @mehul_sharma77 - can you create a calculated column as like below: 

Hope you changed the table reference as per your model.

IdleTimeBetweenCalls =
VAR PreviousCallEndTime =
    CALCULATE(
        MAX('idleti'[CallEndDateTime]),
        FILTER(
            'idleti',
            'idleti'[CallStartDateTime] > EARLIER('idleti'[CallEndDateTime])
        )
    )
RETURN
    IF(NOT(ISBLANK(PreviousCallEndTime)),
        DATEDIFF('idleti'[CallStartDateTime],PreviousCallEndTime, MINUTE),
        BLANK()
    )


 

rajendraongole1_0-1728576282148.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





rajendraongole1
Super User
Super User

Hi @mehul_sharma77 - you can create a calculated column that calculates the difference between the end time of the previous call and the start time of the current call.

IdleTime =
VAR PreviousCallEnd =
    CALCULATE(
        MAX(idleti[CallEndDateTime]),
        FILTER(
            idleti,
            idleti[CallStartDateTime] > EARLIER(idleti[CallStartDateTime])
        )
    )
RETURN
    IF(
        NOT(ISBLANK(PreviousCallEnd)),
        idleti[CallStartDateTime] - PreviousCallEnd,
        BLANK()
    )
 
Hope this helps.

 

 

rajendraongole1_0-1728556639539.png

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Hello 

Thanks for your response, we are looking idle 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 

mehul_sharma77_0-1728558462868.png

 

After running your Dax I got the following error, though I using best in class system configuration 

mehul_sharma77_1-1728558462840.png

 

Please HELP!!!!!

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.