# Divide start stop events

**URL:** <https://forum.knime.com/t/divide-start-stop-events/46253>\
**Category:** KNIME Analytics Platform\
**Created:** [August 23, 2022, 12:13pm UTC](https://forum.knime.com/t/divide-start-stop-events/46253 "2022-08-23T12:13:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pollyste](https://forum-cdn.knime.com/user_avatar/forum.knime.com/pollyste/32/44247_2.png) [@pollyste](https://forum.knime.com/u/pollyste)\
**Post date:** [August 23, 2022, 12:13pm UTC](https://forum.knime.com/t/divide-start-stop-events/46253/1 "2022-08-23T12:13:54Z")

</div>

Hello

I have a table in excel where I have a datetime column with the registration of a single event and a column that tells me the type of event that can be “started” or “finished”.  
I would like to extrapolate from the table the rows in which the event begins and when it ends in order to calculate all the time intervals.  
For the calculation I can take care of it, but how can I divide the table for those specific datetime?

---

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [August 23, 2022, 12:33pm UTC](https://forum.knime.com/t/divide-start-stop-events/46253/2 "2022-08-23T12:33:05Z")

</div>

@pollyste welcome to the KNIME forum. You could try and identify and mark the blocks with numbers and then use a Group By node to identify the Minimum and Maximum.

> [@Move head rows to a column](https://forum.knime.com/t/move-head-rows-to-a-column/45094/2):
>
> @willy_oracle typically you would mark all lines with a [Counter](https://kni.me/n/pVT_aAQrO1Jkt9cG). Then identify the ‘headers’ with a rule engine [IF Col1 LIKE “Head\*” =\> Counter] and keep that (starting) row in a separate column. Then you [fill the missings with the previous value](https://forum.knime.com/t/replace-placeholder-with-values-from-above/38602/4) so a block would emerge marking the data table: [image] So now you have the blocks marked an can use a [Table Row to Variable Loop Start – KNIME Community Hub](https://kni.me/n/q7loejCZ1HWH5hUr) or [Group Loop Start – KNIME Community Hub](https://kni.me/n/7a8fxq51Z1jrgXeM) to do something with the blocks (export them delet…

---

<div class="post-metadata">

**Author:** ![pollyste](https://forum-cdn.knime.com/user_avatar/forum.knime.com/pollyste/32/44247_2.png) [@pollyste](https://forum.knime.com/u/pollyste)\
**Post date:** [August 23, 2022, 12:51pm UTC](https://forum.knime.com/t/divide-start-stop-events/46253/3 "2022-08-23T12:51:52Z")

</div>

Yes I know,  
but it’s possible with a knime nodes?  
I used window function in mysql to obtain it.  
Here how i could make?

---

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [August 23, 2022, 12:56pm UTC](https://forum.knime.com/t/divide-start-stop-events/46253/4 "2022-08-23T12:56:00Z")

</div>

@pollyste the examples use KNIME nodes. Maybe you give them a try.

---

<div class="post-metadata">

**Author:** ![ScottF](https://forum-cdn.knime.com/user_avatar/forum.knime.com/scottf/32/61316_2.png) [@ScottF](https://forum.knime.com/u/ScottF)\
**Post date:** [August 23, 2022, 3:13pm UTC](https://forum.knime.com/t/divide-start-stop-events/46253/5 "2022-08-23T15:13:25Z")

</div>

It would be helpful if for you to post some example data, if you are able, along with what your desired output would look like.

---

<div class="post-metadata">

**Author:** ![pollyste](https://forum-cdn.knime.com/user_avatar/forum.knime.com/pollyste/32/44247_2.png) [@pollyste](https://forum.knime.com/u/pollyste)\
**Post date:** [August 24, 2022, 7:55am UTC](https://forum.knime.com/t/divide-start-stop-events/46253/6 "2022-08-24T07:55:07Z")

</div>

I solved,  
separated the values with Row Filter, added the Add Auto Increment node,  
joined with Concatenate, reordered in increasing order with Sorter, added Add Auto Increment again with a new column, created a third column with the difference of the first two auto increment with Math Function and the difference represents the group to which I apply minimum and maximum

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [August 31, 2022, 7:55am UTC](https://forum.knime.com/t/divide-start-stop-events/46253/7 "2022-08-31T07:55:49Z")

</div>

Closed on August 31, 2022, 7:55am UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
