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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply

Converting number to Hours and Minutes in DAX

Hi,

My goal is to find the average resolution time for the incidents. Below are the DAX queries. I am getting incorrect Average resolution time.  The correct average resolution time is 31:57 (HH:MM). My result is 12:05 (HH:MM). Please let me know if I am missing anything here.

 

1. I converted Time coumn to round to the nearest minutes . 

MinutesRoundTotal =
60 *HOUR(Source[To Resolution (Business)]) + MINUTE ( MROUND ( Source[To Resolution (Business)], TIME ( 0, 1, 0 ) ) + TIME ( 0, 0, 0 ) )
 
2. Calculate average and convert it into hours and minutes. ( Considering the tickets that are resolved in the last 30 days)
Medium_Resolution_Timestamp =
Var ART=calculate(AVERAGE(Source[MinutesRoundTotal]),filter(source,Source[Priority]="Medium"),DATESINPERIOD('Source'[Resolved At].[Date],MAX(Source[Resolved At]),-30,DAY))
Var Result=if(isblank(ART),"No Data Available" & UNICHAR ( 10 ) &"Data displayed is: last 30 days since" & " (" & (today()-30) &")"& ". Priority is: Medium ",FORMAT(ART,"HH:MM" )& UNICHAR ( 10 ) & UNICHAR ( 10 ) & "HH:MM")
Return UNICHAR(10)
& Result
 
Thanks,
Radhika
3 REPLIES 3
tamerj1
Super User
Super User

Hi @Radhika_Kanaka 

DATESINPERIOD is a time intelligence function that works only with standard date table that is marked as date table. 

@tamerj1  Thank you for the response. What can I use instead of DATESINPERIOD for calculating average resolution time for the last 30 days (time is based on Resolved At date/Time field.) 

Hi @Radhika_Kanaka 

you may try
'Source'[Resolved At] >= MAX(Source[Resolved At]-30,

'Source'[Resolved At] <= MAX(Source[Resolved At]),

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.