implementing method for data groupingHi All,
I need help in implementing grouping method (script/ formula) , like the attached image.
The idea is running on the first column ("#") and if the distance between two rows is less than 5 group them as 1, then the next group will be 2 and so on...
thank you very much.

Data TableScriptingRe: implementing method for data groupingYou can use this expression as the formula in your Group column.
If(
Row() == 1, 1,
:X - Lag( :X ) < 5, Lag( :Group ),
Lag( :Group ) + 1
)
Re: implementing method for data groupingThank you very much:)