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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Left join merge without aggregating or expanding?

 

New to Power BI and stuck on a basic question. I'm trying to duplicate a simple report I currently generate using Python/Pandas.

 

I have a data table with 102 rows and a table with 160 rows to lookup a partner name. I can do a left outer merge which correctly matches all 102 rows in the data table. However in the resulting column I am only given the options to Expand or Aggregate the matching records, Expanding results in 160 rows (defeating the purpose of the left join and duplicating data) and Aggregating is not relevant since it is not a numeric field. 

 

Thanks for any suggestions.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I figured out is was due to duplicate records in the lookup table. When I used the "Remove Rows - Duplicates" function on the lookup table the merge returns the correct result. 

 

 

Interesting that my equivalent PANDAS function did not expand the resulting table, even with the duplicates:

 

orders2 = pd.merge(orders, partners, how='left', on='CustomerId')

 

PANDAS only expands the table if there are different lookup values for the same 'CustomerId' and ignores duplicates.

 

Interesting!

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Are you using Power Query?  Any chance can upload some sample data?

Anonymous
Not applicable

I figured out is was due to duplicate records in the lookup table. When I used the "Remove Rows - Duplicates" function on the lookup table the merge returns the correct result. 

 

 

Interesting that my equivalent PANDAS function did not expand the resulting table, even with the duplicates:

 

orders2 = pd.merge(orders, partners, how='left', on='CustomerId')

 

PANDAS only expands the table if there are different lookup values for the same 'CustomerId' and ignores duplicates.

 

Interesting!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors