Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Solved! Go to Solution.
Hello @stvn43,
You can use the TIME function in DAX to create a duration value instead of using the FORMAT function.
Difference =
VAR EditTime =
IF([editbegintime] <= 0, TIME(0, 0, 0),
TimeToEdit[editendtime] - TimeToEdit[editbegintime])
RETURN EditTime
Time to Caption =
VAR TTC = AVERAGEX(FILTER(TimeToEdit, [service] = "Captioning"), [Difference])
RETURN FORMAT(TTC, "HH:MM:SS")
By using the TIME function, you can now use the AverageX function on the Difference column because it returns a duration value instead of a string.
I hope this helps! Let me know if you have any further questions.
Many thanks, Sahir!
Hello @stvn43,
You can use the TIME function in DAX to create a duration value instead of using the FORMAT function.
Difference =
VAR EditTime =
IF([editbegintime] <= 0, TIME(0, 0, 0),
TimeToEdit[editendtime] - TimeToEdit[editbegintime])
RETURN EditTime
Time to Caption =
VAR TTC = AVERAGEX(FILTER(TimeToEdit, [service] = "Captioning"), [Difference])
RETURN FORMAT(TTC, "HH:MM:SS")
By using the TIME function, you can now use the AverageX function on the Difference column because it returns a duration value instead of a string.
I hope this helps! Let me know if you have any further questions.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.