Adding Secondary Time ScaleHello,
I'm looking for an elegant way of creating a "Cycle Time" column, that will start at 00:00:00 every time that the Cycle Count changes (see the example file). The time should be calculated from the original Date and Time columns. The intention is to graphically overlap Cycles related Outputs. Thanks in advance for any ideas!
Basic Data Analysis and ModelingData Exploration and VisualizationWindowsRe: Adding Secondary Time ScaleHi,
Would something like the formula below meet your requirements (as the Loop Time formula)?
If( Row() == 1 | :Cycle != Lag( :Cycle, -1 ),
0,
Lag( :Loop Time ) + Date Difference( :Time, Lag( :Time, -1 ), "second" )
)
Best,
TS
Re: Adding Secondary Time ScaleSorry,
I was too hasty. The above Formula has some issues.
Best,
TS
Re: Adding Secondary Time ScaleThis formula works pretty well. Set the display format to ":day:hr:m:s"
:Date + :Time - Col Min( :Date + :Time, :Cycle )
Re: Adding Secondary Time ScaleThanks for looking into it! Almost done! The formula works and creates the continue secondary time. But it aslo needs to reset to 00:00:00 every time when the cycle number changes.
Re: Adding Secondary Time ScaleFound the issue. You are right, just to replace Cycle to Loop and it works. Awsome!
Re: Adding Secondary Time ScaleThis goes outside of the topic, but it might also be worth it to combine date and time into single timestamp column. In JMP you can do this by just adding those columns together and then changing the format

Before changing the format the timestamp can look weird (number of seconds since January 1, 1904)

Format changed to y/m/d h:m:s

This will basically provide you with plenty of different formatting options and quick formulas from right click menu from the single column

You can also use timestamp column for example in graph builder and if you wish to see data on day level, you can use date/time bin on the axis (right click on the axis)

Re: Adding Secondary Time ScaleTo make sure it separates out the Loop within each Cycle, use both as by columns. Otherwise, Loop 1 in Cycle 2 will continue from Loop 1 in Cycle 1, for example.
(:Date + :Time) - Col Min( :Date + :Time, :Cycle, :Loop )

Re: Adding Secondary Time ScaleThank you, Jarmo! I will try playing with it.