Forum Discussion
Time calculation to predict end time
Could not find a solution that was similar to what I need. I am not sure how to calculate the end time for a particular item. Basically we have a start time (ex. 08:15am) with a 7.5hr cycle, to be removed at (15:15PM). How can I use Power BI to calculate: Time In x Cycle Time = Removal Time?
I hope this works, I just divided Cycle Time by 24 (here 24 is hours in a day)
8 Replies
- sevenhillsSuper User
Tune to your needs:
DAX way
Removal Time = 'Table'[Time In] + Time(7, 30, 0)M Query way
= Table.AddColumn(#"Changed Type", "Removal Time", each [Time In] + #duration(0, 7, 30, 0), type time)Hope this helps
- VijayPCommunity Champion
Question is not clear!
- HamedM1125Advocate III
Hi Pricef1 ,
You can do this in M query but before that you need to have Date and Time columns combined.
After combining it, create a custom column in M query as:
= [Date] + #duration(0,0,0,27000)
--here 27000 is in seconds (7.5 hours)Result:
Thanks,
Hamed
- Pricef1Regular Visitor
Is there a way to have it update automatically? For example not all cycle times are the same. Could vary from 6hrs to 7.5hrs depending on product. Time in * Cycle Time / ?????? maybe?
- HamedM1125Advocate III
I hope this works, I just divided Cycle Time by 24 (here 24 is hours in a day)
- Pricef1Regular Visitor
Or would i need to somehow convert cycle time in a seperate column and then refence that column?