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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

How to get Average if Data Type is is "Text"

Hello Everyone!

I'm having a hard time to get the average of Turn Around Time (TAT) that is in the "Text Format"

my TAT format is like this "hh:mm:ss" and once i visualize this using CARD, there's no option to make it as "Average"

 

Note: there is no "Average" option in "Fields" that's

Nelzkie09_0-1675695937979.png

 

TYIA!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

You can creata a measure

Average_seconds = AVERAGEX('Table (2)',LEFT([Column1],2)*3600+MID([Column1],4,2)*60+RIGHT([Column1],2))

Then put the measure to the card visual

vxinruzhumsft_0-1675737348821.png

 

Best Regards!

Yolo Zhu

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

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous 

You can creata a measure

Average_seconds = AVERAGEX('Table (2)',LEFT([Column1],2)*3600+MID([Column1],4,2)*60+RIGHT([Column1],2))

Then put the measure to the card visual

vxinruzhumsft_0-1675737348821.png

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , You have first create a number out it take avg and then again convert to text

 

Value = averagex( Table, (left([Col],2) *3600) + (mid([Col],4,2) *60) + (right([Col],2) *3600)  )

 

then you can convert to text again 

 

quotient([Value],3600) & ":" & quotient(mod([Value],3600),60) & ":" mod(mod([Value],3600),60)

 

Duration
https://radacad.com/calculate-duration-in-days-hours-minutes-and-seconds-dynamically-in-power-bi-using-dax
https://social.technet.microsoft.com/wiki/contents/articles/33644.powerbi-aggregating-durationtime-in-dax.aspx
https://www.pbiusergroup.com/communities/community-home/digestviewer/viewthread?GroupId=547&MessageKey=814a2cb4-3cca-4cd1-a620-c467adeaaaf6&CommunityKey=b35c8468-2fd8-4e1a-8429-322c39fe7110&tab=digestviewer

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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