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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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 III
Helper III

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

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