Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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 Name | Last Name | Type of Employment | Start Date | Job Title | Business Unit |
| Jack | Bean | Permanent | 1/02/2018 | Team Leader | People |
| Mike | Tyson | Fixed term | 19/02/2016 | Driver | Production |
| Sarah | Parker | Permanent | 26/06/2005 | Accountant | Finance |
| Leaving Employees | |||||
| First Name | Last Name | Type of Employment | Leaving Date | Job Title | Business Unit |
| Tong | Lee | Fixed term | 5/06/2013 | Fighter | Fight Club |
| Harry | Potter | Permanent | 3/09/2016 | Magician | Howards |
| Employees Variations | |||||
| First Name | Last Name | Type of Employment | Leaving Date | Job Title | Business Unit |
| Adele | Shu | Fixed tem | 5/06/2013 | Driver Lead | Production |
| Tom | Kite | Permanent | 3/09/2016 | Management Accountant | Finance |
| February | |||||
| New Employees | |||||
| First Name | Last Name | Type of Employment | Start Date | Job Title | Business Unit |
| Wednesday | Far | Permanent | 1/02/2018 | Team Leader | People |
| Leaving Employees | |||||
| First Name | Last Name | Type of Employment | Leaving Date | Job Title | Business Unit |
| Lazy | Daizy | Fixed term | 5/06/2013 | Fighter | Fight Club |
| Mike | Turner | Permanent | 3/09/2016 | Magician | Howards |
| Larry | William | Permanent | 9/09/2016 | Magician | Howards |
| Employees Variations | |||||
| First Name | Last Name | Type of Employment | Leaving Date | Job Title | Business Unit |
| Jenny | Singh | Fixed term | 5/06/2013 | Driver Lead | Production |
| Tina | Drive | Permanent | 3/09/2016 | Management Accountant | Finance |
| Kate | Moss | Permanent | 5/06/2013 | Financial Accountant | Finance |
Solved! Go to Solution.
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"
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"
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 43 | |
| 39 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 63 | |
| 32 | |
| 30 | |
| 23 |