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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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