Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello,
I am trying to convert run_duration (DD: HH: MM: SS) column to Seconds.
For example, if Run duration is 1 Day: 1 hour: 1 minute: 1 second I need to convert it to 90061 seconds
86400 + 3600 + 60 + 1 = 90061.
Thanks
Solved! Go to Solution.
Seconds = VAR DurationString = SUBSTITUTE(Durations1[Duration], ":", "|") VAR Days = PATHITEM(DurationString,1) VAR Hours = PATHITEM(DurationString,2) VAR Minutes = PATHITEM(DurationString,3) VAR Seconds = PATHITEM(DurationString,4) RETURN Days * 86400 + Hours * 3600 + Minutes * 60 + Seconds
Seconds = VAR DurationString = SUBSTITUTE(Durations1[Duration], ":", "|") VAR Days = PATHITEM(DurationString,1) VAR Hours = PATHITEM(DurationString,2) VAR Minutes = PATHITEM(DurationString,3) VAR Seconds = PATHITEM(DurationString,4) RETURN Days * 86400 + Hours * 3600 + Minutes * 60 + Seconds
@smoupre wrote:
Seconds = VAR DurationString = SUBSTITUTE(Durations1[Duration], ":", "|") VAR Days = PATHITEM(DurationString,1) VAR Hours = PATHITEM(DurationString,2) VAR Minutes = PATHITEM(DurationString,3) VAR Seconds = PATHITEM(DurationString,4) RETURN Days * 86400 + Hours * 3600 + Minutes * 60 + Seconds
Wow, it is really tricky to use PATHITEM to get the substrings. Awesome work .
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
3 | |
3 | |
2 | |
2 | |
2 |