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
amitkala17
Regular Visitor

left join in Report

Hello,

 

i have two query in my report and i am trying to implement left join, here is the scenario,

i have a main table called Emp, and one other table Organaziation, i want to see all the record from emp and only matching record from Organaziation,

at the moment it is showing only the matched record.

Please suggest

5-17-2017 3-48-08 PM.png5-17-2017 3-51-20 PM.png

 

 

 

 

1 ACCEPTED SOLUTION
v-yuezhe-msft
Employee
Employee

Hi @amitkala17,

Based on my test, NATURALLEFTOUTERJOIN doesn’t work in this scenario.

In Query Editor, click on the Emp table, then select “Merge Queries as New” to merge the two tables, then expand the orgname column in the merged table. It doesn’t impact on your current tables using the merge query feature to get expected result.
1.PNG2.PNG3.PNG

Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
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

9 REPLIES 9
v-yuezhe-msft
Employee
Employee

Hi @amitkala17,

Based on my test, NATURALLEFTOUTERJOIN doesn’t work in this scenario.

In Query Editor, click on the Emp table, then select “Merge Queries as New” to merge the two tables, then expand the orgname column in the merged table. It doesn’t impact on your current tables using the merge query feature to get expected result.
1.PNG2.PNG3.PNG

Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

hii 
@amitkala17 
I Create a report This type of merge (left join),Report Locally working good but i published on Workspace(web cloud) ,Sheduled Refresh(Update) is not working.You have any idea pls give it.

image.png

 

Thanks Dear,

 

i got this one, 

what i understood is by default all queries are linked with inner join, and if we have a requirement of left/right join we need to create a seprate query.

correct me if i am wrong.

 

spuder
Resolver IV
Resolver IV

hi @amitkala17

 

unfortunately this is the wrong place for your project.

 

You better use the Query Editor (Power Query) and merge the tables. There you can choose which join type you'd like to have.

 

example.jpg

Hello,

 

i do not want to use merge query,

so it mean query's support only inner join? 

 

5-17-2017 5-29-52 PM.png

 

empno & fname is from Emp table & Orgname is from Organazation Table,matched record is appering in the last, and organization that does not have employee are appearing in top.

but what i want is to get all employee and only matching org ,if no match org will be null

OK. Understand try the DAX Function =NATURALLEFTOUTERJOIN()

where will i add this function?

check out this video, it better explains how to control the SQL that Power BI automatically creates...https://www.youtube.com/watch?v=UgqVSEoj4BM

 

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.