cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Bingo1913 Frequent Visitor
Frequent Visitor

Multiple Tables

Hi 

 

I am trying to import data from an excel that has multiple tables formatted like this. Three tables are included, New Employees, Employee variations and Leaving Employees. 

 

I would like to insert another column that would classify each row as either a New Employee, Employee variations and Leaving Employees.

 

Is this possible? Appreciate anyone that can help.

 

Thanks

Mike

 

January     
New Employees     
First NameLast NameType of EmploymentStart DateJob TitleBusiness Unit
JackBeanPermanent1/02/2018Team Leader People
MikeTysonFixed term19/02/2016DriverProduction
SarahParkerPermanent26/06/2005AccountantFinance
      
Leaving Employees     
First NameLast NameType of EmploymentLeaving DateJob TitleBusiness Unit
TongLeeFixed term5/06/2013FighterFight Club
HarryPotterPermanent3/09/2016MagicianHowards
      
Employees Variations     
First NameLast NameType of EmploymentLeaving DateJob TitleBusiness Unit
AdeleShuFixed tem5/06/2013Driver LeadProduction
TomKitePermanent3/09/2016Management AccountantFinance
      
February     
New Employees     
First NameLast NameType of EmploymentStart DateJob TitleBusiness Unit
WednesdayFarPermanent1/02/2018Team Leader People
      
      
      
Leaving Employees     
First NameLast NameType of EmploymentLeaving DateJob TitleBusiness Unit
Lazy DaizyFixed term5/06/2013FighterFight Club
Mike TurnerPermanent3/09/2016MagicianHowards
LarryWilliamPermanent9/09/2016MagicianHowards
      
Employees Variations     
First NameLast NameType of EmploymentLeaving DateJob TitleBusiness Unit
JennySinghFixed term5/06/2013Driver LeadProduction
TinaDrivePermanent3/09/2016Management AccountantFinance
KateMossPermanent5/06/2013Financial AccountantFinance
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Multiple Tables

Once you have your data in a stack you can add a conditional column that looks for the word "Employees" in the first column and grabs that value if it finds it.  After that you can use the fill down to tag all the rows.

 

let
    Source = Table,
    #"Added Conditional Column" = Table.AddColumn(Source, "Custom", each if Text.Contains([Column1], "Employee") then [Column1] else null),
    #"Filled Down" = Table.FillDown(#"Added Conditional Column",{"Custom"})
in
    #"Filled Down"

 

employee_1.jpg

2 REPLIES 2

Re: Multiple Tables

Once you have your data in a stack you can add a conditional column that looks for the word "Employees" in the first column and grabs that value if it finds it.  After that you can use the fill down to tag all the rows.

 

let
    Source = Table,
    #"Added Conditional Column" = Table.AddColumn(Source, "Custom", each if Text.Contains([Column1], "Employee") then [Column1] else null),
    #"Filled Down" = Table.FillDown(#"Added Conditional Column",{"Custom"})
in
    #"Filled Down"

 

employee_1.jpg

Bingo1913 Frequent Visitor
Frequent Visitor

Re: Multiple Tables

Thank you jdbuchanan71 . That absolutely worked.