Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Converting production run durations to by-day schedule

scottconstance
5 - Atom

Hello Alteryx community,

 

I have some data describing the length of production runs on a production line.  So one column specifies the line, the second column specifies the completion date of the production run, and the third column specifies the length in days of the production run.

 

I need to convert this into a by-day schedule of when the line was run.  So one column would specify the line just like before, but the second column would specify a single day, and the third column would specify the proportion of the day that the line was run (i.e., maximum = 1).

 

I've attached an xls illustrating the data I have to start with and what I'd like to end with.  I feel like the Generate Rows tool should work but I can't get it to work quite right.

 

Thank you for reading and for any help you can provide.

17 REPLIES 17
Tyro_abc
11 - Bolide

Hi @scottconstance 

 

Do you need those extra dates ? 4/13 and 4/14. 

 

If you do not need, then please find the attached workflow.  But if you need them, I was wondering why not other dates of April,2021? 

 

arundhuti726_0-1608701194702.png

 

Please note, I used few extra steps for easier understanding, some of these steps can be omitted.

 

Best Regards

Arundhuti

Qiu
20 - Arcturus
20 - Arcturus

@scottconstance 
Just in case you need those empty days/

1223-scottconstance.PNG

scottconstance
5 - Atom

Thank you very much, Qiu, it is cool how you did the join to add in the sequential days not covered by production runs.  Much appreciated!

scottconstance
5 - Atom

Arundhuti,

 

Thank you very much for the workflow and for being thoughtful about whether I needed the extra unused days.  I don't need them but it is nice that you thought of it!

 

I had not known about the FLOOR function and I'm glad I do now!  Thanks again and take care.

 

Best regards,

Scott

Qiu
20 - Arcturus
20 - Arcturus

@scottconstance 

Thank you for the accept also.

Tyro_abc
11 - Bolide

Glad I could help. 

Ahacibo
6 - Meteoroid

Hi @Tyro_abc ,

 

I have a similar requirement with the difference that I want to convert not only into days but also into hours (clock 0 to 23), because my production duration is in hours. In attachmtnt are my raw data.

Duration 1/04:10:00 means 1 day, 4 housr and 10 min.

Can you hellp me with this?

Example

Order NumberStar DateStart timeDuration
117.01.202109:39:000/01:40:00

Result should be like that:

Order NumberStar DateStart timeDurationClockDuration_1
117.01.202109:39:000/01:40:0090,35
117.01.202109:39:000/01:40:00101
117.01.202109:39:000/01:40:00110,32

 

Best regards,

Boštjan

Tyro_abc
11 - Bolide

Hi 

 

Based on my understanding, I tried this; you might need slight tweak on how to represent the duration. Please also test the workflow for different scenario.

 

arundhuti726_0-1610915447751.png

 

Let me know if you need any explanation on any step

 

Best Regards

Arundhuti

Ahacibo
6 - Meteoroid

Hi @Tyro_abc 

 

It looks good. I will make more test before I confirm flow.

 

In the meantime, I also developed it by myself. I have just problem when production is two or more days.

 

Raw data is a little different.

 

Can you please check and comment my flow?

 

 

Thank you and best regards,

Boštjan

 

Labels