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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
iabramson
Frequent Visitor

Estimated Start and End Times

Hello, I am trying to create a schedule tool that will estimate the start and end times of diffrent steps in a manuifacturing sequence. As the step gets completed data will come in to the start time and end time columns in my table and it will indicate which step is in progress and which are future steps.

 

How do I then take the last time in the sequence and use that to estimate start times for the other steps.  For example (see below) current step is step 9:

Step 9's end time will be the start time + target time to give an end time (since its in progress).

Step 10 start time will = step 9 end time and step 10 end time will be step 10 start time + step 10 target time.

Step 11 start time will = step 10 end time ; step 11 end time will be step 11 start time + step 11 target time this cycle will repeat until step 14......

The cycle will then be reapted over again for type 2 (step 1 type 2 est start time will be step 14 type 1 end time... step 1 type 2 end time will be step 1 type 2 start time + target)

 

 

iabramson_0-1746729465521.png

 

SeqStepStart TimeEnd TimeIn ProgressFutureTypeTarget TimeDurationEstimated end in progressEstimated Start Timestart

1Sterilize5/7/2025 7:47:15 PM5/7/2025 8:30:30 PM0010.80.720833333325572  #ERROR
2Idle Dry Ster5/7/2025 8:30:30 PM5/7/2025 8:47:00 PM0010.50.275000000023283  #ERROR
3Media5/7/2025 8:47:00 PM5/7/2025 9:21:14 PM0010.530.570555555517785  #ERROR
4Media Done5/7/2025 9:21:14 PM5/7/2025 9:22:59 PM0010.20.0291666666744277  #ERROR
5Bster5/7/2025 9:22:59 PM5/7/2025 11:43:15 PM0012.322.33777777786599  #ERROR
6Idle Ster5/7/2025 11:43:15 PM5/8/2025 1:19:29 AM0010.51.60388888890157  #ERROR
7Pre-Inoc5/8/2025 1:19:29 AM5/8/2025 1:30:59 AM0010.50.191666666592937  #ERROR
8Ferment5/8/2025 1:30:59 AM 1013613.86115925927885/9/2025 1:30:59 PM #ERROR
9Harvest  0111.25   #ERROR
10Centrifuging  0111.5   #ERROR
11Idle Dirty  0111.25   #ERROR
12CIP  0111.15   #ERROR
13Idle Clean  0110.25   #ERROR
14Citric  0110.85   #ERROR
1Sterilize  0120.8   #ERROR
2Idle Dry Ster  0120.5   #ERROR
3Media  0120.53   #ERROR
4Media Done  0120.2   #ERROR
5Bster  0122.32   #ERROR
6Idle Ster  0120.5   #ERROR
7Pre-Inoc  0120.5   #ERROR
8Ferment  01236   #ERROR
9Harvest  0121.25   #ERROR
10Centrifuging  0121.5   #ERROR
11Idle Dirty  0121.25   #ERROR
12CIP  0121.15   #ERROR
13Idle Clean  0120.25   #ERROR
14Citric  0120.85   #ERROR

 

1 ACCEPTED SOLUTION
v-venuppu
Community Support
Community Support

Hi @iabramson ,

Yes, you can implement this using DAX calculated columns, especially since your Target Time values are stored in a separate lookup table. Here's how you can achieve it:

1.Your main table (StepsTable, for example) should have a relationship to the TargetTimeLookup table on [Step] or [Seq].

2.Create Calculated Columns:

a.Estimated Start Time =
VAR CurrentType = StepsTable[Type]
VAR CurrentSeq = StepsTable[Seq]
VAR PrevStepEndTime =
CALCULATE(
MAX(StepsTable[Estimated End Time]),
FILTER(StepsTable,
StepsTable[Type] = CurrentType &&
StepsTable[Seq] = CurrentSeq - 1
)
)
RETURN
IF(StepsTable[Future] = 1,
PrevStepEndTime,
BLANK()
)

b.Estimated End Time =
VAR StartTime = StepsTable[Estimated Start Time]
VAR TargetTime =
LOOKUPVALUE(
TargetTimeLookup[Target Time],
TargetTimeLookup[Step], StepsTable[Step]
)
RETURN
IF(StepsTable[Future] = 1,
StartTime + (TargetTime / 24),
BLANK()
)

  • Make sure your Target Time is in hours, hence dividing by 24.

This logic naturally resets at each Type since we filter by [Type] = CurrentType.

If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

Thank you.

View solution in original post

6 REPLIES 6
v-venuppu
Community Support
Community Support

Hi @iabramson ,

I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please accept it as a solution and give it a 'Kudos' so other community members with similar problems can find a solution faster.

Thank you.

v-venuppu
Community Support
Community Support

Hi @iabramson ,

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.

Thank you.

v-venuppu
Community Support
Community Support

Hi @iabramson ,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

 

v-venuppu
Community Support
Community Support

Hi @iabramson ,

Yes, you can implement this using DAX calculated columns, especially since your Target Time values are stored in a separate lookup table. Here's how you can achieve it:

1.Your main table (StepsTable, for example) should have a relationship to the TargetTimeLookup table on [Step] or [Seq].

2.Create Calculated Columns:

a.Estimated Start Time =
VAR CurrentType = StepsTable[Type]
VAR CurrentSeq = StepsTable[Seq]
VAR PrevStepEndTime =
CALCULATE(
MAX(StepsTable[Estimated End Time]),
FILTER(StepsTable,
StepsTable[Type] = CurrentType &&
StepsTable[Seq] = CurrentSeq - 1
)
)
RETURN
IF(StepsTable[Future] = 1,
PrevStepEndTime,
BLANK()
)

b.Estimated End Time =
VAR StartTime = StepsTable[Estimated Start Time]
VAR TargetTime =
LOOKUPVALUE(
TargetTimeLookup[Target Time],
TargetTimeLookup[Step], StepsTable[Step]
)
RETURN
IF(StepsTable[Future] = 1,
StartTime + (TargetTime / 24),
BLANK()
)

  • Make sure your Target Time is in hours, hence dividing by 24.

This logic naturally resets at each Type since we filter by [Type] = CurrentType.

If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

Thank you.

v-venuppu
Community Support
Community Support

Hi @iabramson ,

Thank you for reaching out to Microsoft Fabric Community.

I’ve prepared a Power BI solution that implements your manufacturing sequence estimation logic using Power Query (M code). 

Please find the attached .pbix file for your reference.

The attached .pbix file includes:

1.Dynamic calculation of Estimated Start Time and Estimated End Time for steps where Future = 1.
2.Uses the last available End Time (or calculated estimate) as the reference for the next step.
3.Supports in-progress steps using actual Start Time if available.

If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

Thank you.

Is there a way to do this outside of power query using a calculated column? my target times live in a lookup table (outside of power query)

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.