Forum Discussion
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
- Greg_Deckler
Community Champion
Theoretically you should just be able to add/subtract your time values, right?
- AnonymousNot 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?
- Greg_Deckler
Community Champion
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.
- v-chuncz-msft
Community Support
Anonymous
You may take a look at the post below.
- AnonymousNot 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"))) - AnonymousNot applicable
Thanks for the suggestions, however since I had complete control over the SQL I solved it there.