- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Elapsed Time Calculation
so i have different "runs" in one dataset, while i could break them out, i'd like to leave them as one dataset the goal is as follows:
- Two relevant columns for formula
- Run Number (Numeric Ordinal)
- Elapsed Time (Numeric Cont)
- Goal: do a count with a 20ms offset and reset to zero each time the Run Number changes
- Since this time series is in set intervals of 20ms, i'm safe to do a count, but the count isn't going to go in intervals of 20ms
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Elapsed Time Calculation
I'm not sure if I understand correctly how your data looks like, but Col Cumulative Sum should work. Take the sum of either 1 or :"Elapsed Time"n
Col Cumulative Sum(1, :"Run Number"n)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Elapsed Time Calculation
Hello,
I am also not sure I followed the question setup, but assuming Elapsed Time is a continuously running clock, and you want to calculate time within each "Run Number" from zero to the duration of the run- this slightly longer alternative will do it in the units of the elapsed time column.
:Elapsed Time - Col Minimum( :Elapsed Time, :Run Number )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Elapsed Time Calculation
This appears to me that you want automatically make a data table like this
You can use a formula for the Elapsed Time Column like the one shown below. It uses conditional If( ) and also the Lag( ) function to get the previous row's data from a column
example data table attached.