User Tools

Site Tools


transformations:enumerate

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revisionBoth sides next revision
transformations:enumerate [2014/10/03 21:53] – created dmitrytransformations:enumerate [2019/11/19 07:35] – added grouping dmitry
Line 1: Line 1:
 ===== Enumerate rows ===== ===== Enumerate rows =====
  
-This transformation adds a new column with row number for all rows starting from topIt doesn't have parameters.+This transformation adds a new column with row numbers. Rows can be enumerated either for the entire table, or inside groups defined by combinations of values in particular columnsIn the latter case, row numbers restart from 1 inside each group.
  
 **Example** **Example**
Line 8: Line 8:
 ^Province  ^Amount  ^Total Tax  ^ ^Province  ^Amount  ^Total Tax  ^
 |  ON  | 1000| 125| |  ON  | 1000| 125|
-|  OM  | 1500| 187.5|+|  ON  | 1500| 187.5|
 |  QC  |    2000| 270| |  QC  |    2000| 270|
  
-After transformation+After transformation (enumeration for entire table).
 ^RowNo ^Province  ^Amount  ^Total Tax  ^ ^RowNo ^Province  ^Amount  ^Total Tax  ^
 |  1|  ON  | 1000| 125| |  1|  ON  | 1000| 125|
-|  2|  OM  | 1500| 187.5|+|  2|  ON  | 1500| 187.5|
 |  3|  QC  |    2000| 270| |  3|  QC  |    2000| 270|
 +
 +After transformation (enumeration for each Province).
 +^RowNo ^Province  ^Amount  ^Total Tax  ^
 +|  1|  ON  | 1000| 125|
 +|  2|  ON  | 1500| 187.5|
 +|  1|  QC  |    2000| 270|
transformations/enumerate.txt · Last modified: 2022/11/12 22:56 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki