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
Anonymous
Not applicable

dax for avg talk duration

hi

i have a coulmn showing talk duration 

but i wanted to display the avg of talk duration.

greeshma_0-1615119069663.png

 

1 ACCEPTED SOLUTION
v-cazheng-msft
Community Support
Community Support

Hi, @Anonymous 

You can try the following steps.

 

1 Create a Calculated column

duration = HOUR('Table'[Talk Duration])*3600+MINUTE('Table'[Talk Duration])*60+SECOND('Table'[Talk Duration])

 

2 Create a Measure

Average_Duration =

VAR avr = AVERAGE ( 'Table'[duration] ) RETURN TIME ( 0, 0, avr )

 

The result looks like this:

v-cazheng-msft_0-1615278088241.png

Here is the pbix.

 

Best Regards,

Caiyun Zheng

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-cazheng-msft
Community Support
Community Support

Hi, @Anonymous 

You can try the following steps.

 

1 Create a Calculated column

duration = HOUR('Table'[Talk Duration])*3600+MINUTE('Table'[Talk Duration])*60+SECOND('Table'[Talk Duration])

 

2 Create a Measure

Average_Duration =

VAR avr = AVERAGE ( 'Table'[duration] ) RETURN TIME ( 0, 0, avr )

 

The result looks like this:

v-cazheng-msft_0-1615278088241.png

Here is the pbix.

 

Best Regards,

Caiyun Zheng

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

ryan_mayu
Super User
Super User

@Anonymous 

you can create a meausre

measure=average(table[Talk Duration])





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

hi ryan

i have tried applying ur query but unable to display the value

greeshma_0-1615122370496.png

 

@Anonymous 

please change the data type to time and  make sure your raw data is correct.

I did a test, the year month day value maybe affect the result. If so, please remove them and only keep the time value.

1.PNG2.PNG.

average seconds

average = AVERAGE('Table'[Talk Duration])*60*60*24

3.PNG

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.