Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
enath
Helper I
Helper I

combine file from folder and keep new and old column

Hello all,

I have a question on combine csv from folder.

I have many csv files like this

enath_0-1659359203811.png

 

I combine the files together all is ok. But then I have another csv file with a new column like this:

enath_1-1659359420405.png

 

I do the steps from the video https://www.youtube.com/watch?v=JAw4rrpc7vk  I add this
#"Removed Other Columns1" = Table.SelectColumns(#"Renamed Columns1", {"Source.Name", "Transform File"}),
Data = #"Removed Other Columns1"[Transform File],
Headers = List.Distinct(List.Combine(List.Transform(Data, Table.ColumnNames))),
#"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File", Headers),

and I get the new column as expected. 

But then in the data attached to the new file in power bi, the last column at the end is removed from the data like if the was a maximum number of column that can be loaded.
If I want to be able to see the new column and to keep the last column I have to remove a column....but I don't want to remove any column.
How can I overcome this problem in order to get new column without loosing any other column?

thank a lot

2 REPLIES 2
v-yanjiang-msft
Community Support
Community Support

Hi @enath ,

This blog from Chris Webb detailes the workaroud about this issue: 

Making Sure All Columns Appear When You Combine Data From Multiple Files In Power BI

And a video for your reference: The BEST way to combine files in Power BI so you don’t lose columns -  YouTube

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Thank you for you answer.

but it does not solve the problem.

I saw that the transform data is uploaded everytime. 

I tried another way, but I guess I use the wrong transform file....

Helpful resources

Announcements
September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Top Solution Authors