{{ transformations:FillGapsAction.png}}
====== FILL DOWN ======
Category: Transform / Advanced\\

\\ 
=====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.\\

\\
=====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".

===Before (source table)===
^  Country  ^  State/ Province  ^
|Canada  |Alberta  |
|    |British Columbia  |
|    |Manitoba  |
|USA  |Alabama  |
|    |Alaska  |
|    |Arizona  |

===After (result table)===
^  Country  ^  State/ Province  ^
|Canada  |Alberta  |
|**Canada**  |British Columbia  |
|**Canada**  |Manitoba  |
|USA  |Alabama  |
|**USA**  |Alaska  |
|**USA**  |Arizona  |

===Action parameters===
> Fill gaps in columns: Country

\\
====Example #2====
>Fill in empty cells in "First Name" based on the values in "Last Name" and "Position".

===Before (source table)===
^Row Num ^First Name  ^Last Name  ^Position  ^
|  1|Bob |Wilson |Admin |
|  2| |Wilson |Admin |
|  3| |Wainright |Accountant |
|  4|Lisa |Smith |CEO |
|  5| |Smith |CEO |
|  6|Darci |Wilson |Accountant |

===After (result table)===
^Row Num ^First Name  ^Last Name  ^Position  ^
|  1|Bob |Wilson |Admin |
|  2|**Bob** |Wilson |Admin |
|  3| |Wainright |Accountant |
|  4|Lisa |Smith |CEO |
|  5|**Lisa** |Smith |CEO |
|  6|Darci |Wilson |Accountant |

===Action parameters===
> Fill gaps in columns: First Name
> Group by columns: Last Name, Position

\\ 
=====Community examples=====
  * [[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]]