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
Anonymous
Not applicable

Power Query equivalent to Left Join

I am working on a project for sales where there are 4 types of offers and every rep should be making each. I want to see how many of them are doing each kind of offer.

 

For my data, I have a query showing every offer made that contains the reps name and the offer type. Then I have a second query showing all the offer types.

 

What I would like is a new query that takes the list of offers and shows me how many of each type of offer each rep is making. I know I can do a group by Rep and offer then that will give me a count for all of them except if a rep has not made any of a singe offer.

 

What I was thinking to do is what in SQL would be a left join when for each rep it will add a row for each offer type. Then I could do a left outer join with a counts table (The counts table would be created by grouping the offer data by rep name then offer type) where it checks for matching rep name and offer type, then if it does not have a match, it would just put null in the new column.

 

I am sure there is a better way to do that but this is the only way I can think of. My problem is there is not Left Join in power query. Any recomendations for ways aroud this? Thanks!

1 ACCEPTED SOLUTION

@Anonymous,

 

Just add a custom column.

= Table.AddColumn(Source, "Custom", each Table2)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

 

Share a dataset and show the expected result.  Paste the data here in a format so that i can easily copy and paste it in an Excel workbook.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
LivioLanzo
Solution Sage
Solution Sage

Hi @Anonymous

 

in Power Query you have the possibility to join two tables by using the 'Merge' feature. In there you can choose different kinds of joins, Left Outher, Inner, Right Outer, Left anti, Right Anti. Have you already tried to use it?

 


 


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


Proud to be a Datanaut!  

Anonymous
Not applicable

Yes. The issue is for each rep, i need all all the contents of the second table.

@Anonymous,

 

Just add a custom column.

= Table.AddColumn(Source, "Custom", each Table2)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.