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
CR
Resolver II
Resolver II

Merge queries generating duplication of lines

Hi,
 
I'm surprised to discover that some lines in one of my dashboard are duplicated when I merge 2 tables through the Query Editor. I know the differences between the types of links as explained on the site RADACAD (but maybe not finally).
 
But, first of all, I don't understand why it didn't happened few days/weeks ago with the same data !
 
Somebody faced to this issue ?
 
Regards,
CR

1 ACCEPTED SOLUTION

@CR   still hard to see without the source data, ie the tables before they merge

 

you sure you dont have duplicates?  or any funny characters, have you done a trim and clean on those columns before you do a merge?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

7 REPLIES 7
vanessafvg
Super User
Super User

@CR  can you share what you have done, very hard to figure it out with such little information

 

has the data changed at all or is it exactly the same, please give more information in order to assist, or share the file.





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Hi @vanessafvg 

 

You're right, please find below some details.

 

Table 1

DOC REFERENCE | OBJECT | CODE
DOCREF1 | START | 1
DOCREF1 | IFD | 1

Table 2

CODE | DISCIPLINE
1 | DISCI_1
2 | DISCI_2

 

In Table 1, I've added 2 steps;

 

Merge query 1

= Table.NestedJoin(#"previsous step",{"CODE"},TABLE1,{"CODE"},"TABLE_2",JoinKind.LeftOuter)

Merge query 2

= Table.ExpandTableColumn(#"Merge query 1", "TABLE_2", {"CODE"}, {"CODE"})

The Merge query 1 is fine for me (no duplication and matching between the tables)

1.png

but not the Merge query 2 that duplicates the lines in the Table 1.

DOC REFERENCE | OBJECT | CODE | DISCIPLINE
DOCREF1 | START | 1 | DISCI_1
DOCREF1 | START | 1 | DISCI_1
DOCREF1 | IFD | 1 | DISCI_1
DOCREF1 | IFD | 1 | DISCI_1

Regards,

CR

 

 

Hi @vanessafvg 

 

You're right, please find below some details.

 

Table 1

DOC REFERENCE | OBJECT | CODE
DOCREF1 | START | 1
DOCREF1 | IFD | 1

Table 2

CODE | DISCIPLINE
1 | DISCI_1
2 | DISCI_2

 

In Table 1, I've added 2 steps;

 

Merge query 1

= Table.NestedJoin(#"previsous step",{"CODE"},TABLE1,{"CODE"},"TABLE_2",JoinKind.LeftOuter)

Merge query 2

= Table.ExpandTableColumn(#"Merge query 1", "TABLE_2", {"CODE"}, {"CODE"})

The Merge query 1 is fine for me (no duplication and matching between the tables)

1.png

but not the Merge query 2 that duplicates the lines in the Table 1.

DOC REFERENCE | OBJECT | CODE | DISCIPLINE
DOCREF1 | START | 1 | DISCI_1
DOCREF1 | START | 1 | DISCI_1
DOCREF1 | IFD | 1 | DISCI_1
DOCREF1 | IFD | 1 | DISCI_1

Regards,

CR

Hi @vanessafvg 

 

You're right, please find below some details.

 

Table 1

DOC REFERENCE | OBJECT | CODE
DOCREF1 | START | 1
DOCREF1 | IFD | 1

Table 2

CODE | DISCIPLINE
1 | DISCI_1
2 | DISCI_2

 

In Table 1, I've added 2 steps;

 

Merge query 1

= Table.NestedJoin(#"previsous step",{"CODE"},TABLE1,{"CODE"},"TABLE_2",JoinKind.LeftOuter)

Merge query 2

= Table.ExpandTableColumn(#"Merge query 1", "TABLE_2", {"CODE"}, {"CODE"})

The Merge query 1 is fine for me (no duplication and matching between the tables)

1.png

but not the Merge query 2 that duplicates the lines in the Table 1.

DOC REFERENCE | OBJECT | CODE | DISCIPLINE
DOCREF1 | START | 1 | DISCI_1
DOCREF1 | START | 1 | DISCI_1
DOCREF1 | IFD | 1 | DISCI_1
DOCREF1 | IFD | 1 | DISCI_1

Regards,

CR

 

 

@CR   still hard to see without the source data, ie the tables before they merge

 

you sure you dont have duplicates?  or any funny characters, have you done a trim and clean on those columns before you do a merge?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




After 3 hours I found out! Special characters! It was a C cyrillic (not latin)... impossible to see with an eye...

Thanks for the suggestion because it helped me!

Regards,

CR

@CR  well done.





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




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.