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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
jppuam
Helper V
Helper V

LEFT OUTER JOIN not working

Hello,

i've a table A with the follow:

code_ID    department     costs

1               chemistry        100

2               math                200

3               sociology         300

4               reading            400

 

and a table B with:

code_ID    department     costs

1               chemistry        100

3               sociology         300

 

i want to have a calculatedtable that gives me the data in table A, thats not in table B ?

its the same that i exclude the data in table B that exist in table A.

 

code_ID    department     costs

2               math                200

4               reading            400

 

I've try several functions, but i must be doing some wrong.

 

thanks

JP

 

 

1 ACCEPTED SOLUTION
Jos_Woolley
Solution Sage
Solution Sage

If the matching is to be based on all 3 columns:

NewTable =
EXCEPT ( Table1, Table2 )

Regards

View solution in original post

9 REPLIES 9
Jos_Woolley
Solution Sage
Solution Sage

If the matching is to be based on all 3 columns:

NewTable =
EXCEPT ( Table1, Table2 )

Regards

i try that, but i was using a calculated table that i've made and it wasnt working.

I've change to the original table, an it works....dont understand what was the problem, but its working.

thanks

Jos_Woolley

 

Jos_Woolley
Solution Sage
Solution Sage

Hi,

New query, merge as new:

Jos_Woolley_0-1632645316928.png

You can then delete the final column resulting from this query.

If the operation is to consider not just the code_ID column then select all columns as required when performing the merge, for example:

Jos_Woolley_1-1632645582092.png

Regards

 

Regards

Jos,

when i try to merge two query by code, ir gives me this error:

 

Expression.Error: The 'count' argument is out of range. What is the problem ?

 

thanks,

JP

Hi JP,

Most likely because you have some rows containing errors prior to the merge. Difficult to be sure without seeing the actual data though, I'm afraid.

Regards

Maybe its because of the size ? I'm filterinig 1,8M lines ? 

The columns dont have any erros, can i do it by DAX ?

 

thanks,

JP

Sorry, I'm afraid I don't know the answer as to why you're getting that error.

Regards

I was trying to do it with DAX, i'll try it like you said.

JP

Fowmy
Super User
Super User

@jppuam 

Use Left-Anti Join when merging the tables in Power Query

https://docs.microsoft.com/en-us/power-query/merge-queries-left-anti


Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.