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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Crobelo
New Member

Remove duplicates keeping different values

HI,

 

I am fairly new at this, and not sure if this feature is available. 

 

I need to develop a PBI Dashboard that conects diferent data from multiple databases, but one of those just has available a faulty extraction that duplicates the registries given that a multiple option variable has two values checked. What I need is to remove the duplicate registries without loosing the multiple variable values that caused the duplication in the fiert place.

 

Below is an example of one of the duplicate registries in the original excel file.

 

 

ejemplo.PNG

 

As you can see, Div_fis and Calz_fis have two values cheked, therefore cuadrupling the registry. What I need is to merge those registries in some way, could be concatenating de duplicates only when the values are different grouping by the ID, or something like that but I don't know how to do it.

 

Please Help!

 

Thanks 

C.

 

 

PD: 

 

I've tried gruping by ID, and then using the table.column comand to extract the column, but it will concatenate the values that are the same, as "provincia" in the example above.

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Crobelo,

On the query editor select all the columns with duplicate values that you want to remove and then remive duplicate.

Check the link below.

https://support.office.com/en-us/article/remove-duplicates-power-query-d9cffc69-dc5d-4d94-8b66-72779...

Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
Tad17
Solution Sage
Solution Sage

Hey @Crobelo 

 

@MFelix is correct, you will need to go into Query Editor and select the column that has the unique identifier that you wish to keep a single line for and then select "Remove Duplicates".

 

If you need the total for Div_Fis & Calz_Fis since they have different numbers for each line then you will have to create a measure using a sumif formula: https://community.powerbi.com/t5/Desktop/Sumif-in-Power-BI/td-p/15457

 

If you need each of those lines combined in some way you will have to use measures. If you just need one of those lines you can remove duplicates. If you do not have a unique identifier column in the original excel file then I recommend making one like in this article: https://exceljet.net/formula/extract-all-matches-with-helper-column

MFelix
Super User
Super User

Hi @Crobelo,

On the query editor select all the columns with duplicate values that you want to remove and then remive duplicate.

Check the link below.

https://support.office.com/en-us/article/remove-duplicates-power-query-d9cffc69-dc5d-4d94-8b66-72779...

Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.