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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
rpinxt
Solution Sage
Solution Sage

Getting double lines when I merge and pull in a field from another directquery source

I have no clue what is going on.

So I have a report and it hold 2 directquery sources. My main source and I smaller source with a few column.

Just enought column to make a key and the value that should be returned on this key.

 

It runs every 15 minutes and there is a timestamp for every run so we can do trending.

 

Well after 2 runs I would expect this:

rpinxt_0-1729259186718.png

1 delivery for the run of 15:15 and the run of 15:30. Perfect.

 

But when I in power query now merge to pull in 1 field from the 2nd source:

rpinxt_1-1729259260561.png

So both sources have this key. It is merged on that key and from then 2nd query I want to bring in StorageType as you see.

 

And after I bring it in....:

rpinxt_2-1729259370472.png

 

Now the runs have doubled! And I have 4 times this delivery instead of 2 times which it should be.

What is going on here??

And I check these 4 lines in excel.....they are identical.

Why would power bi double them after a merge?

Can only think it has something to do with the key but they also look identical numbers.

 

 

1 ACCEPTED SOLUTION
NordicDrow
Helper I
Helper I

Hello there!

Whenever you merge, it will merge all columns with all columns (as long as the group columns have the same value).

I'd need to see the merge details, but my guess is you are merging 2 rows with 2 rows by a column with all equal values, there needs to be a unique identifier for each row.

As an example, if you are merging by DeliveryDocNBR, and Query1 rows 1 & 2 have the same value, then Query2 rows 1 & 2 have the same values, it would duplicate Query1 row 1 to match with query2 row 1 and then 2, then do the same with the other row.

Is a bit confusing to explain, sorry, but basically if your mergin columns are not unique, data will always multiply.

View solution in original post

2 REPLIES 2
rpinxt
Solution Sage
Solution Sage

Thanks @NordicDrow  but it is indeed a bit hard to understand. Better I close this thread and make a new one in which I better explain as I also have made a sample file with only 1 delivery which also gets double. So meaby it is easier to see in that small example.

NordicDrow
Helper I
Helper I

Hello there!

Whenever you merge, it will merge all columns with all columns (as long as the group columns have the same value).

I'd need to see the merge details, but my guess is you are merging 2 rows with 2 rows by a column with all equal values, there needs to be a unique identifier for each row.

As an example, if you are merging by DeliveryDocNBR, and Query1 rows 1 & 2 have the same value, then Query2 rows 1 & 2 have the same values, it would duplicate Query1 row 1 to match with query2 row 1 and then 2, then do the same with the other row.

Is a bit confusing to explain, sorry, but basically if your mergin columns are not unique, data will always multiply.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors