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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

New Column guidance

I'm working on a dashboard using a gauge and need to accommodate a scenario in which a job doens't kick off.

I have a column 'Expected Run Time' that is elapsed hours, mins, seconds -  example: 02:46:32

I have a column 'Begin Execution Time' that is a time stamp of when the job kicked off -  example: 2020-02-17 04:30:03.390

I need to establish an expected start time based on the previous elapsed hours, mins, seconds and the begin execution time. 

 

Thanks so much in advance! 

9 REPLIES 9
v-chuncz-msft
Community Support
Community Support

@Anonymous 

 

You may take a look at the post below.

https://community.powerbi.com/t5/Desktop/Adding-Duration-to-a-Start-time-to-achieve-a-time-value/m-p/143404#M61873

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks for the suggestions, however since I had complete control over the SQL I solved it there. 

Anonymous
Not applicable

I was able to get this DAX to work. I'm still working through getting the differences in the runtimes to be displayed as well. 

 

Delay = IF([Status] ="Failed", "999", (IF([RunTime]>[AvgRunTime],"120","1")))
 
Greg_Deckler
Community Champion
Community Champion

Theoretically you should just be able to add/subtract your time values, right?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

I tought that as well, but when I converted the column that is hours, mins, seconds to date time it didn't work. Don't they both have to be date/time stamp to add or subtract from each other? 

@Anonymous ah, I missed that one was essentially duration. See if this helps: https://social.technet.microsoft.com/wiki/contents/articles/33644.powerbi-aggregating-durationtime-in-dax.aspx

 

And it's update: https://community.powerbi.com/t5/Quick-Measures-Gallery/Chelsie-Eiden-s-Duration/m-p/793639?search-action-id=101896880406&search-result-uid=793639

 

You'll probably have to parse out the hours, minutes and seconds from your duration and figure out how many seconds it is and then add that to your datetime value.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Would I need to generate tables for hours, minutes and seconds? 

Can you share sample data and sample output.Thanks.
Proud to be a Datanaut My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

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
Anonymous
Not applicable


BeginExecutionTime          EndExecutionTime             RunTime   ExpctdRunTime   AvgRunTime
2020-02-17 04:30:00.127   2020-02-17 07:32:04.497   03:02:04   10:00:00              03:39:11
2020-02-17 04:00:00.237   2020-02-17 04:02:18.260   00:02:18   10:00:00              00:03:41
2020-02-17 04:30:03.390   2020-02-17 06:46:18.747   02:16:13   02:46:32              02:45:05
2020-02-17 04:30:02.970   2020-02-17 04:30:32.343   00:00:28   00:00:30              00:00:30
2020-02-17 06:46:19.217   2020-02-17 07:32:04.450   00:45:45   00:47:41              00:47:35

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.