Forum Discussion
Combine files with different column structure
- Anonymous2 years ago
Hi lishapruthi ,
Replace the expanded column names with the following code:List.Distinct(List.Combine(List.Transform (#"Removed Other Columns1"[Transform File],each Table.ColumnNames(_))))Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
Hi Lisha,
You can put them in a folder.
Here use Combine & Transform data --> Ok.
An automated query is executed here:
Check the table under Other Queries --> Go to this query --> Manually expand and remove the following extra steps
Output:
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
Hi Anonymous ,
But is there any solution to get columns dynamically because everytime new file added in the folder there willl be more columns than previous files. In that case, we cannot update in powerquery everytime. it should be added automatically.How can we solve this issue.
Thanks,
Lisha
- Anonymous2 years agoNot applicable
Hi lishapruthi ,
Replace the expanded column names with the following code:List.Distinct(List.Combine(List.Transform (#"Removed Other Columns1"[Transform File],each Table.ColumnNames(_))))Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
- lbry91 year agoNew Member
Hi,
This solution is the closest I've come to being able to do this. I'm running into an error though. I have 4 files in a folder and I'm getting the following error at this last step. It may be because only one of my files says it's setup as a table. If so, could you help guide me?