cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Column Matches

Hi,

I would like to learn wherher there is a solution; there are two or more different reports which have similar data but under different column names such one report contains Date, Customer Name, Product And Quantity, ... Other report has the same data but under different column names and different places on the table such as Musteri Adi (Customer Name), Tarih (Date), Miktar (Quantity), Urun (Product) ... How can I match the columns while appending the reports?

Best Regards, 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IV
Super User IV

Re: Column Matches

Hi @HasanK 

 

Sure, its because I forgot to mention a rather imported thing, the function is using one of the columns in the columns mapping table, to fix the error you can rename the column names or adjust the function.

 

 

image.pngimage.png

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

View solution in original post

6 REPLIES 6
Highlighted
Super User IV
Super User IV

Re: Column Matches

Hi @HasanK 

 

Just change the column names in one table to align with the other before you append.

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn


 

Highlighted
Frequent Visitor

Re: Column Matches

Hi @Mariusz 

Yes excatly Ihave done this methot, my challanges is each week new sales reports come from different customers, similar formats but different languages and some contain additional unsuseful data, it takses a time, I need a kind of connector or something  

Highlighted
Super User IV
Super User IV

Re: Column Matches

Hi @HasanK 

 

Please see the attached with a solution, it can be set as per below.

You can create an extra table with all the possible column names and translations, in the attached example table name is columnsMapping.

Create a function that will check names in the given file against your mapping table and rename the column accordingly, in my example the function name is renameColumns and it's applied as a step in the data table, but if you work with folders that could be adjusted to a column and invoked as "Invoke Custom Function" that way you could expand all columns together without extra step to append.

 

let me know if anything isn't clear.

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

 

Highlighted
Frequent Visitor

Re: Column Matches

Hi @Mariusz ,

Thanks for sharing, this is my first experience, I am rookie... I have got an error, 

An error occurred in the ‘’ query. Expression.Error: The field 'find' of the record wasn't found.
Details:
Find=Disty
Replace=01_Disty

Highlighted
Super User IV
Super User IV

Re: Column Matches

Hi @HasanK 

 

Sure, its because I forgot to mention a rather imported thing, the function is using one of the columns in the columns mapping table, to fix the error you can rename the column names or adjust the function.

 

 

image.pngimage.png

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

View solution in original post

Highlighted
Frequent Visitor

Re: Column Matches

Hi @Mariusz,

It was case sensitive, thank you very much...

Helpful resources

Announcements
May 2020 Community Highlights

May 2020 Community Highlights

It’s time for another PBI Community recap!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Top Solution Authors