filter a specific number of rows or the maximum number of rows within a certain range

Hello All,

I have the following dataset.

The required outcome is as below,
image

The logic is that, after the cell is 12 or 13, 6 rows should be filtered, until it finds another 12 or a 13. if the number of rows are under 6 till it finds 12 or 13, the maximum numbers possible should be filtered.

Hope this makes sense.

Attached the input and output for your convenience.

Thank you
Kanishka
Book1.xlsx (9.0 KB)

Hello @kanishka271
Please find attached workflow. I’ve tested two possible approach based in provided data:

  • The first one based on preserving consecutive row values.
  • Second approach is based in row position as requested in your description.


20230203_filter_six_rows_after_digit_v0.knwf (73.7 KB)

You may notice the outputs differ in latest group, Row 24

BR

1 Like

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