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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
jainparag
Frequent Visitor

Help Required calculating duration

Hello Team,

I need your help in the below scenario

jainparag_0-1683094704138.png

i want to calculate the duration column where it shows the number of hours and minutes taken to resolved the call excluding weekends (Created on from Resolved on columns). If you look at the second row it has calculated correctly in Network duration 0.09 minutes but row one is taking 3 days but my network duration is showing 23:00.

 

Below is the formula, i have used for network duration:

 

Network Duration = NETWORKDAYS(Data[Created on],Data[Resolved on],1)-1-MOD(Data[Created on],1)+MOD(Data[Resolved on],1)

 

Can you please help me at the earliest,thanks

 

1 ACCEPTED SOLUTION
Mahesh0016
Super User
Super User

@jainparag i think you forgot second max date in table name.i highlight that you miss out in code.
MM = ABS(DATEDIFF( MAX( 'Data'[Created on]), MAX(Data[Resolved on] ),MINUTE))Data
[Resolved on]

 

@jainparag If this post helps, then please consider Accept it as the solution and give Kudo to help the other members find it more quickly.  
thank you!

View solution in original post

3 REPLIES 3
Mahesh0016
Super User
Super User

@jainparag i think you forgot second max date in table name.i highlight that you miss out in code.
MM = ABS(DATEDIFF( MAX( 'Data'[Created on]), MAX(Data[Resolved on] ),MINUTE))Data
[Resolved on]

 

@jainparag If this post helps, then please consider Accept it as the solution and give Kudo to help the other members find it more quickly.  
thank you!

Mahesh0016
Super User
Super User

hi @jainparag you want to two date minute or day?

 

Mahesh0016_0-1683115908314.png

 

 

Thanks Mahesh,

As per you, i am trying the below code:

MM = ABS(DATEDIFF( MAX( 'Data'[Created on]), MAX([Resolved on] ),MINUTE))
can you please help me in correcting this 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.