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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
mtrevisiol
Helper IV
Helper IV

Correct similar rows of a table

Hi everyone!

 

I've got a table with the list of customers, it is something like this

CustSuppCompanyNameCityAddressZip CodeTelephoneCountry Code
01022**POLAND SRLWarsawaRed Street, 32 +48 123PL
01562POLAND S.R.L.WarsawaRed Street05092+48 123 

 

These two customers are the same company, so I'd like to have only one row that represent it in my table. The problem is that some information are contained in the first row (the street number, the country code) and others in the second one (the zip code).

 

What is the best way to modify this data using power query, in order to have all the data available in a single line, like

CustSuppCompanyNameCityAddressZip CodeTelephoneCountry Code
01022POLAND S.R.L.WarsawaRed Street, 3205092+48 123PL

 ?

 

Thank you so much.

1 ACCEPTED SOLUTION
v-kelly-msft
Community Support
Community Support

Hi @mtrevisiol ,

 

You could use "group by":

v-kelly-msft_0-1622711718747.png

Then reorder the column per your request,and you will see:

v-kelly-msft_1-1622711756963.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

View solution in original post

6 REPLIES 6
v-kelly-msft
Community Support
Community Support

Hi @mtrevisiol ,

 

You could use "group by":

v-kelly-msft_0-1622711718747.png

Then reorder the column per your request,and you will see:

v-kelly-msft_1-1622711756963.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

@v-kelly-msft  thank you!

v-kelly-msft
Community Support
Community Support

Hi  @mtrevisiol ,

Is there any other column that can be used as the key value to determine that the companies are the same one.

For example,can Telephone be used as a unique value to distinguish companies?

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

 

@v-kelly-msft Yes, I think that telephone can be used as a key.

Fowmy
Super User
Super User

@mtrevisiol 

You need at least one column that has a common value in both the rows, I see ** in Company Name.
And, the address column is not consistent. Can you share a bigger sample that represents your actual data, you can repalce confidential information. 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

@Fowmy why did you mention the ** in the company name? I don't know why they have been inserted.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors