User Tools

Site Tools


transformations:fillgaps

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
transformations:fillgaps [2018/07/21 11:32] dmitrytransformations:fillgaps [2021/07/18 01:36] (current) craigt
Line 1: Line 1:
-===== Fill gaps =====+{{ transformations:FillGapsAction.png}} 
 +====== FILL DOWN ====== 
 +Category: Transform / Advanced\\
  
-This transformation fills the empty cells in selected columns by duplicating the value of cell above the empty ones.  +\\  
-The cells get filled downwards.  +=====Description===== 
 +This action fills the empty cells in selected columns by duplicating the value of the last non-empty cell above the empty ones. The cells are filled downwards.\\
  
-EXAMPLE+\\ 
 +=====Use cases===== 
 +  * To fill gaps that may be inherent in an imported outlined or hierarchical data structure. 
 + 
 +\\  
 +=====Action settings===== 
 +^Setting ^Description ^ 
 +|Fill gaps in selected columns|Select one or more columns to fill empty cells within.| 
 +|Group by selected columns|Select the column(s) where matching values will determine what the source value is to fill in.| 
 + 
 +\\  
 +=====Examples===== 
 + 
 +**Example 1:** Add the name of the country in the empty cells of the column "Country".\\
  
 **Table:** Countries and States/ Provinces **Table:** Countries and States/ Provinces
  
 ^  Country  ^  State/ Province  ^ ^  Country  ^  State/ Province  ^
- Canada  Alberta +|Canada  |Alberta 
-|    |  British Columbia +|    |British Columbia 
-|    |    Manitoba +|    |Manitoba 
- USA  |  Alabama +|USA  |Alabama 
-|    |  Alaska +|    |Alaska 
-|    |  Arizona  |+|    |Arizona  | 
 +\\  
 +**Action parameters:** 
 +> Select "Country" column. 
 +\\  
 +**Result table:**
  
-**Objective:** Add the name of the country in empty cells of the column "Country".+^  Country  ^  State/ Province 
 +|Canada  |Alberta 
 +|Canada  |British Columbia 
 +|Canada  |Manitoba 
 +|USA  |Alabama 
 +|USA  |Alaska 
 +|USA  |Arizona 
 +\\  
 +\\  
 +**Example 2:** Fill in empty cells in "First Name" based on the values in "Last Name" and "Position".\\
  
-**Transformation:** Select the column and calculate. +**Table:** Staff positions
  
-**Result:**+^Row Num ^First Name  ^Last Name  ^Position 
 +|  1|Bob |Wilson |Admin | 
 +|  2| |Wilson |Admin | 
 +|  3|Lisa |Smith |CEO | 
 +|  4|Darci |Wilson |Accountant | 
 +|  5| |Wainright |Accountant | 
 +|  6|Tony |Smith |Accountant | 
 +|  7| |Smith |Accountant | 
 +|  8|Roger |Wainright |Accountant | 
 +|  9| |Smith |Custodial | 
 +|  10| |Wilson |Admin | 
 +\\  
 +**Action parameters:** 
 +> Fill gaps in "First Name" column 
 +> Group by "Last Name" and "Position" columns 
 +\\  
 +**Result table:** 
 +^Row Num ^First Name  ^Last Name  ^Position 
 +|  1|Bob |Wilson |Admin | 
 +|  2|Bob |Wilson |Admin | 
 +|  3|Lisa |Smith |CEO | 
 +|  4|Darci |Wilson |Accountant | 
 +|  5| |Wainright |Accountant | 
 +|  6|Tony |Smith |Accountant | 
 +|  7|Tony |Smith |Accountant | 
 +|  8|Roger |Wainright |Accountant | 
 +|  9| |Smith |HR Manager| 
 +|  10|Bob |Wilson |Admin |
  
-^  Country  ^  StateProvince  ^ +  * "Bob" is filled in where Last Name is "Wilson" //and// Position is "Admin" (rows 2 and 10).\\ 
- Canada  |  Alberta  | +  * "Tony" is filled in where Last Name is "Smith" //and// Position is "Accountant" (row 7).  It is //not// filled in row 9 as Position is "HR Manager" and no previous records have a First Name value for the Last Name = "Smith" and Position = "HR Manager" combination.\\ 
- Canada  | British Columbia  | +  * No value is filled in row 5 as there is no Last Name = "Wainright" and Position = "Accountant" record //prior// to the empty cell. (The First Name of "Roger" - row 8 - falls //after// the empty value - row 5.)\\ 
-|  Canada     Manitoba  + 
-|  USA   Alabama  +\\  
-|  USA   Alaska  +====Community examples==== 
-|  USA  |  Arizona  |+  * [[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: //9//) 
 +  * [[https://community.easymorph.com/t//2275/2|Data on multiple rows from Excel file]] ([[https://community.easymorph.com/uploads/short-url/xmZfLPwSmGmm6WmlLRV2XkCKAo4.morph|Project]]; Module: //Main//; Group: //Group 1//; Table: //Book1.xlsx//; Action position: //2//) 
 +  * [[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: //6//) 
 + 
 +\\  
 +=====See also===== 
 +  * [[transformations:fillright|Fill right]]
transformations/fillgaps.1532187121.txt.gz · Last modified: 2018/07/21 11:32 by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki