cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Bingo1913
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
jdbuchanan71
Super User
Super User

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

View solution in original post

2 REPLIES 2
jdbuchanan71
Super User
Super User

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

Thank you jdbuchanan71 . That absolutely worked.

Helpful resources

Announcements
collabdays lisbon

CollabDays Lisbon - 26 November 2022

Sessions include practical, hands-on experience that will help you take the next step in your career and know-how.

Difinity Conference

Difinity Conference 2022

Difinity is the largest Microsoft Data, AI, Power BI, Power Platform and Business Applications Conference in New Zealand.

European Share Point Conference

European Share Point Conference

This conference returns live and in-person in Copenhagen this 28 November-01 December with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Microsoft 365 Conference â__ December 6-8, 2022

Microsoft 365 Conference - 06-08 December

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.