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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
arthur_gand
Frequent Visitor

After merging columns in Power BI, I get duplicate rows

Hello everyone,

I'm going through a new process of creating a goal calculation tool in my company using PowerBI. 


I have two tables > 
fMeta_Escolhida - In it I have the sectors, subsectors and their respective % in target

fAno_Passado_Meta - In it I bring with the merge the Goal column of the previous table, but what happens is the following, it duplicates the rows, in addition, I have subcategories, which should apply correct %, but it duplicates, taking the two subcategories;

 

image 01 - My fMeta_Escolhida
image 02 - fAno_Passado_Meta - I put the filter to show, where the external subsector was supposed to be 32%, but it creates a line with 11% and another with 32%.

 

Why does this occur?
Is there a way, other than merging, to bring the values of each sector and subsector?

 

Image 01Image 01Image 02Image 02

1 ACCEPTED SOLUTION
vicky_
Super User
Super User

Are you merging your queries on the Celula Column by any chance?
Since the fMeta_Escolhida has two values for Celula = INDAIATUBA (one is 32% the other is 11%) there will be a dupliucate in the resulting table. 
If you're looking to only get one value, then you need to be more specific with how you join your tables - either create a new composite column (i.e concatenate a few columns to create a unique primary key to use in your join), or you can filter / remove duplicates in the fMeta_Escolhida so that only the value you want will be available in the merge.

View solution in original post

1 REPLY 1
vicky_
Super User
Super User

Are you merging your queries on the Celula Column by any chance?
Since the fMeta_Escolhida has two values for Celula = INDAIATUBA (one is 32% the other is 11%) there will be a dupliucate in the resulting table. 
If you're looking to only get one value, then you need to be more specific with how you join your tables - either create a new composite column (i.e concatenate a few columns to create a unique primary key to use in your join), or you can filter / remove duplicates in the fMeta_Escolhida so that only the value you want will be available in the merge.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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