Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
plz could you help me to convert this: 00:06:30 to seconds in power bi
Thank you
Solved! Go to Solution.
Hi @ayoubb
for average with @v-alq-msft solution you can try AVERAGE([TotalSecond column])
or
AVERAGEX(Table, HOUR([Time])*3600+MINUTE([Time])*60+SECOND([Time]) )
Hi, @ayoubb
You mau try to create a custom in 'Query Editor' or create a calculated column/measure in Power BI Desktop. I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
Query Editor:
You may create a custom column as below.
Here is the code in 'Advanced Editor'.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjCwMjCzMjZQitWBcCyQOZZWhqZKsbEA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Time = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Time", type time}}),
Custom1 = Table.AddColumn(#"Changed Type","TotalSecond",each Time.Hour([Time])*3600+Time.Minute([Time])*60+Time.Second([Time])
)
in
Custom1
Calculated column:
TotalSecond Column = HOUR([Time])*3600+MINUTE([Time])*60+SECOND([Time])
Or
Measure:
TotalSecond Measure =
var _time = SELECTEDVALUE('Table'[Time])
return
HOUR(_time)*3600+MINUTE(_time)*60+SECOND(_time)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you so much for your help,
if i want to calculate the average of this colonne after using this formula : TotalSecond column = HOUR([Time])*3600+MINUTE([Time])*60+SECOND ([Time])
is it gona be:
Average in seconds = Average ([Time])????
Hi @ayoubb
for average with @v-alq-msft solution you can try AVERAGE([TotalSecond column])
or
AVERAGEX(Table, HOUR([Time])*3600+MINUTE([Time])*60+SECOND([Time]) )
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!