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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Lokesh4120
Frequent Visitor

undefined

Could you please help me on how to calculate time range dynamically(days & hours) for more than 4dates using dax.

Say,

1.10/07/2022 7:00PM ticket initiated

2.14/07/2022 2:30PM requested for clarification from initiator

3.15/07/2022 10:00AM responded and given clarification

4.16/07/2022 3:30PM again requested for clarification

5.17/07/2022 4:55PM responded and given clarification

6.18/07/2022 9:10AM ticket closed

 

Dates may be added if requested for another clarification based on the ticket.We need to calculate total hours/days took to complete the ticket...Thankyou

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Lokesh4120,

Is there any other field to map the ticket id of these records?
If that is the case, you can use the current ticket id to find out the 'first date' and 'last date', then you can simply use datediff function to calculate the difference.

Regards,

Xiaoxin Sheng

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @Lokesh4120,

Is there any other field to map the ticket id of these records?
If that is the case, you can use the current ticket id to find out the 'first date' and 'last date', then you can simply use datediff function to calculate the difference.

Regards,

Xiaoxin Sheng

Hi @Anonymous Thank you for the reply.

 

Will try this and confirm you if it works.

jaideepnema
Solution Sage
Solution Sage

Hi @Lokesh4120 

Can you share a sample dataset to understand your dataset ?

Hi@jaideepnema,

Thanks for the reply.

I don't have a dataset for this as this is a new requirement.I got a task to think on this requirement.

Lokesh4120
Frequent Visitor

@Ashish_Mathur.

@Hariharan_R 

@dm-p .......please help

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.