Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

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

Anonymous
Not applicable

Thank you jdbuchanan71 . That absolutely worked.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

Find out what's new and trending in the Fabric Community.