キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
言語を選択 翻訳バーを非表示
Nalrus
Level II

Adding Secondary Time Scale

Hello,

 

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!

1 件の受理された解決策

受理された解決策
mmarchandFSLR
Level VI

Re: Adding Secondary Time Scale

This formula works pretty well.  Set the display format to ":day:hr:m:s"

 

:Date + :Time - Col Min( :Date + :Time, :Cycle )

 

元の投稿で解決策を見る

8件の返信8
Thierry_S
Super User

Re: Adding Secondary Time Scale

Hi, 

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

Thierry R. Sornasse
Thierry_S
Super User

Re: Adding Secondary Time Scale

Sorry,

 

I was too hasty. The above Formula has some issues.

 

Best,

TS

Thierry R. Sornasse
mmarchandFSLR
Level VI

Re: Adding Secondary Time Scale

This formula works pretty well.  Set the display format to ":day:hr:m:s"

 

:Date + :Time - Col Min( :Date + :Time, :Cycle )

 

Nalrus
Level II

Re: Adding Secondary Time Scale

Thanks 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. 

Nalrus
Level II

Re: Adding Secondary Time Scale

Found the issue. You are right, just to replace Cycle to Loop and it works. Awsome!

mmarchandFSLR
Level VI

Re: Adding Secondary Time Scale

To 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 )

mmarchandFSLR_0-1744890308194.png

 

jthi
Super User

Re: Adding Secondary Time Scale

This 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

jthi_0-1744866682927.png

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

jthi_5-1744866993703.png

 

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

jthi_1-1744866727483.png

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

jthi_4-1744866892825.png

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)

jthi_3-1744866833781.png

 

-Jarmo
Nalrus
Level II

Re: Adding Secondary Time Scale

Thank you, Jarmo! I will try playing with it. 

おすすめの記事