Forum Discussion

ltnguyen's avatar
ltnguyen
Regular Visitor
7 years ago
Solved

Combine files (binary) for files with different structures

Hello,

 

I have a function that combines files from a folder where most of the files have the same template. Recently the source files that I've been dragging into the folder have changed in structure and the table uses less columns than the original files. I need to keep both old and new files but what I noticed is that when the data is pulled, the data from the newer files are in the wrong columns (as there are less columns in the newer files).

 

In this screenshot, the values in the first 3 rows should be shifted over as they don't match the column titles.

 

Is there a way to clean files and merge columns with the same title as they're being pulled into pbi?

 

Or is there a way to have 2 combine files functions to take care of the files with the old structure and another function to take care of the files with the new structure?

 

Any help would be appreciated!