Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

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 t...
  • jdbuchanan71's avatar
    7 years ago

    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"