Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hello Everyone,
I linked an external database to access and then linked from access to PowerBI.
I am trying to create a dashboard to extract worked hours, but when doing the link described above, the worked hours came as DATE/TIME, not duration, so PowerBI does not sum the hours correctly, I need to convert DATE/TIME to duration but didn't find any solution to make this.
I already tried to do as bellow
EDIT QUERY / Transform Collum / Transform Time only = The time came i.e. 5:00:00.
Also tried to convert as Duration, but PowerBI just give me a message of error, not allowing to convert it.
Can someone help me?
Solved! Go to Solution.
You cannot automatically convert a Time column to a duration since a Time is a single point in time so it has no duration. But in your case it sounds like something like 05:00 should be a duration of 5 hours. So one way to do this is calculate the duration from midnight to the specified time. You can do this by subtracting a time of "00:00" from your current time column (subtracting one time from another returns a duration)
If you click on "Add Column" in the ribbon then choose the "Custom Column" optoin and enter a formula like the following it will return a duration.
[YourTimeColumn] - Time.FromText("00:00:00")
You cannot automatically convert a Time column to a duration since a Time is a single point in time so it has no duration. But in your case it sounds like something like 05:00 should be a duration of 5 hours. So one way to do this is calculate the duration from midnight to the specified time. You can do this by subtracting a time of "00:00" from your current time column (subtracting one time from another returns a duration)
If you click on "Add Column" in the ribbon then choose the "Custom Column" optoin and enter a formula like the following it will return a duration.
[YourTimeColumn] - Time.FromText("00:00:00")
@ggarciadynamik4 Chelsie Eiden's Duration - Microsoft Power BI Community
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!