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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
JohanBroersma
New Member

Calculating Average of sum of time

Hello,

 

I have created a measure that shows the time difference between two columns. I have then a sum of these times.

 

At the top of the report I have a DAX calculation to calculate the average time difference (in this case the response time). The card shows an average of 02:29 (2 hours 29 minutes). If I do a manual calculation I get an average of around 33 minutes (((14 * 60) + 😎 / 25).

 

DAX calculation for card: 

AverageResponseTime = FORMAT(Calculate(AVERAGEx(incidents,Incidents[creationDate] - Incidents[responseDate])), "HH:mm")

 

Time difference measure:

Time Difference = SUMX(Incidents, Incidents[creationDate] - Incidents[responseDate])

 

What I am looking for is the average response time for all incidents.

 

JohanBroersma_0-1659988124755.png

 

1 ACCEPTED SOLUTION

No worries.  If you are using a column value or a calculated column you can add that to fileds then select average from the dropdown.  I don't believe you can do this with a measure however.

dcrow5378_0-1660056100258.png

 

View solution in original post

3 REPLIES 3
dcrow5378
Helper II
Helper II

I might just create a calculated column for the Time Difference, then use that column in the card and change the calculation type of the card to Average.

Pardon my ignorance - I do not know how to change the calculation type of the card.

 

Could you clarify?

No worries.  If you are using a column value or a calculated column you can add that to fileds then select average from the dropdown.  I don't believe you can do this with a measure however.

dcrow5378_0-1660056100258.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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