Going forward and backward across rows

Besides the common use cases explained in the previous sections, there are other use cases that work with groups of rows, looking for rows before or after the current one within each group.

Some examples of this are as follows:

  • You have a dataset with monthly sales, group by product line. For each product line, you want to calculate the variation of sales from one month to the next.
  • You have daily sales and want to infer the number of days without sales. (This is the gap in days between a date and the next in your dataset.)
  • You have a dataset with a list of sales amounts and sales commissions. The fields in your dataset are sales_amount_from, sales_amount_to, and commission_%. You detected that there ...

Get Learning Pentaho Data Integration 8 CE - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.