User Tools

Site Tools


transformations:shiftcolumn
no way to compare when less than two revisions

Differences

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


Previous revision
Next revision
transformations:shiftcolumn [2021/04/23 01:25] craigt
Line 1: Line 1:
 +{{ transformations:ShiftColumnAction.png}}
 +======SHIFT COLUMN UP/DOWN======
 +Category: Transform / Advanced \\
 +
 +\\ 
 +=====Description=====
 +This action shifts values in the 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.\\
 +
 +\\ 
 +=====Action settings=====
 +^Setting^Description^
 +|Column|Select the column shift.|
 +|Shift direction|Select whether the column's rows will be shifted up or down.  Options: //Up// or //Down//.|
 +|Shift by N rows<sup>*</sup>|Select or enter the number of rows to be shifted by.|
 +|Mode|Select whether the results of this action will overwrite the selected column's content, or if a new column will be created.\\ Options: //Create new column// (and provide a column name) or //Replace column//.|
 +<sup>*</sup> Setting can be specified using a [[:parameters|parameter]].
 +
 +\\ 
 +=====Examples=====
 +**Objective:**  Calculate the delta with previous year. For this, we're appending a new column ("Prev. year sales"), shifted down by 1 row.\\
 +
 +**Source data:** Sales by year.
 +^  Year  ^  Sales  ^
 +|  2010 |  10000|
 +|  2011 |  12100|
 +|  2012 |   9000|
 +|  2013 |  11000|
 +|  2014 |   8500|
 +|  2015 |  11300|
 +\\ 
 +**Action parameters:**
 +> Column is "Sales"
 +> Shift "Down"
 +> Shift by 1 row
 +> Mode is "Create new column", named "Prev. year sales"
 +
 +
 +\\ 
 +**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: 2021/07/19 02:18 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki