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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.