Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi
I have managed to automate the import of multiple tabs in an Excel spreadsheet that prefix with 'Date' 🙂
let
Source = Excel.Workbook(File.Contents("C:\Users\mbo06\OneDrive - MyPharma\MMCL - PowerBI\ForecastvsBudget - PowerBI.xlsx"), null, true),
#"Filtered Rows" = Table.SelectRows(Source, each Text.StartsWith([Name], "Date"))
in
#"Filtered Rows"
Now, I need to union all tables together do that I see all data columns for all of the tables. Can anyone help with M functions?
Just use Table.Combine().
Table.Combine(Table1, Table2, #"Some other table name", Table4)
That will append 4 tables into one. All columns will be visible from all tables. Any columns in one table not in another will result in null showing up in the other tables.
By default Table.Combine is Union All. To get a normal union, you'd need to follow up with Table.Distinct().
The Combine operation is what you might want to use, but it is only designed to combine identical tables. It doesn't handle different tables with different columns.
If you need more help, please share some data.
How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingThanks for getting back to me. How do I union all using a wildcard for 'Date'?
I tried this and it did not work
let
Source = Excel.Workbook(File.Contents("C:\Users\mbo06\OneDrive - MyPharma\MMCL - PowerBI\ForecastvsBudget - PowerBI.xlsx"), null, true),
#"Filtered Rows" = Table.SelectRows(Source, each Text.StartsWith([Name], "Date"))
,Table.Combine= ( each Text.StartsWith([Item], "Date"))
in
#"Filtered Rows"
Again, if you need further help, please provided sample data. Otherwise I am just guessing as to what will work and we will go back and forth.
How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingSorry - I count see an option to share files / data. Are you able to access here : https://github.com/ametsanalytics/ExcelFiles
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
97 | |
78 | |
64 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |