User Tools

Site Tools


transformations:shiftcolumn

Differences

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

Link to this comparison view

transformations:shiftcolumn [2018/05/24 02:52] (current)
dmitry created
Line 1: Line 1:
 +===== Shift column =====
 +
 +This action shifts values in specified column up or down. When a column is shifted down, empty cells are inserted at the top of the column. When shifted up, empty cells are inserted at the bottom.
 +
 +===Use cases===
 +This action can be used in cases when a comparison with a previous/​future period is required.
 +
 +===Example===
 +Source data: sales by year.
 +^  Year  ^  Sales  ^
 +|  2010 |  10000|
 +|  2011 |  12100|
 +|  2012 |   9000|
 +|  2013 |  11000|
 +|  2014 |   8500|
 +|  2015 |  11300|
 +
 +Objective: Calculate the delta with previous year. For this, we're appending a new column which is column [Sales] shifted down by 1 row.
 +
 +Result:
 +^  Year  ^  Sales  ^ Prev. year sales ^
 +|  2010 |  10000| ​      |
 +|  2011 |  12100| ​ 10000|
 +|  2012 |   ​9000| ​ 12100|
 +|  2013 |  11000| ​  9000|
 +|  2014 |   ​8500| ​ 11000|
 +|  2015 |  11300| ​  8500|
 +
  
transformations/shiftcolumn.txt · Last modified: 2018/05/24 02:52 by dmitry