User Tools

Site Tools


transformations:shiftcolumn

Differences

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

Link to this comparison view

Next revision
Previous revision
transformations:shiftcolumn [2018/05/23 22:52] – created dmitrytransformations:shiftcolumn [2021/07/19 02:18] (current) – [Examples] craigt
Line 1: Line 1:
-===== Shift column =====+{{ transformations:ShiftColumnAction.png}} 
 +======SHIFT COLUMN UP/DOWN====== 
 +Category: Transform / Advanced \\
  
-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.+\\  
 +=====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.+=====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.+=====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===== 
 +**Example:**  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  ^ ^  Year  ^  Sales  ^
 |  2010 |  10000| |  2010 |  10000|
Line 15: Line 32:
 |  2014 |   8500| |  2014 |   8500|
 |  2015 |  11300| |  2015 |  11300|
 +\\ 
 +**Action parameters:**
 +> Column is "Sales"
 +> Shift "Down"
 +> Shift by 1 row
 +> Mode is "Create new column", named "Prev. year sales"
  
-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:+\\  
 +**Result table:**
 ^  Year  ^  Sales  ^ Prev. year sales ^ ^  Year  ^  Sales  ^ Prev. year sales ^
 |  2010 |  10000|       | |  2010 |  10000|       |
Line 27: Line 50:
 |  2015 |  11300|   8500| |  2015 |  11300|   8500|
  
 +\\ 
 +====Community examples====
 +  * [[https://community.easymorph.com/t//1590/4|Puzzler: derived column from two columns]] ([[https://community.easymorph.com/uploads/short-url/5OvCYyhfiaCg5XZU3nALaT5eql4.morph|Project]]; Module: //Main//; Group: //Tab 1//; Table: //Table 1//; Action position: //4//)
 +  * [[https://community.easymorph.com/t//1686/2|Aggregation of consecutive date ranges]] ([[https://community.easymorph.com/uploads/short-url/xyC5nPd52hGrMiRXjp5w1RVUTYL.morph|Project]]; Module: //Main//; Group: //Tab 1//; Table: //Easymorph Patient Example Data.xlsx//;\\ Action position: //3//)
 +  * [[https://community.easymorph.com/t//1972/2|Read Data with two line header]] ([[https://community.easymorph.com/uploads/short-url/4YFQxslIv3pmgtF2eRywf4wpcFQ.morph|Project]]; Module: //Main//; Group: //Tab 1//; Table: //Read, Mark groups//; Action position: //8//)
  
transformations/shiftcolumn.1527130366.txt.gz · Last modified: 2018/05/23 22:52 by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki