Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi everyone
I would if anyone could give me some pointers as struggling a bit. My SQL query knowledge is not great. I need to tranlate this into DAX. and doing my research but goig around in circles a bit!!
the SQL query is:
select personview.forename, personview.surname,
wlocation.dateanswervalue as "Expiry Date from Last Carer Monitoring",
personOrgRelationshipView.organisationname as "Scheme",
publia.answervalue as "Expiry Date from Pre-Placement Checklist",
personview.personid
from personview
left join formanswerpersonview wlocation
on personview.personid=wlocation.answerforsubjectid
and designguid ='f98ab2f7-7010-4c93-b9de-2801066ccda8'
And controlname='certificateExpiryDate'
and instancestate='COMPLETE'
and wlocation.instanceid= (
select max (x.instanceid)
from formanswerpersonview x
where x.answerforsubjectid = wlocation.answerforsubjectid
and x.designguid = wlocation.designguid
and x.instancestate='COMPLETE'
)
left join formanswerpersonview publia
on personview.personid=publia.answerforsubjectid
and publia.designguid ='3f6d7b80-e1b6-4286-b6a9-803fc569706b'
And publia.controlname='date_21'
and publia.instancestate='COMPLETE'
and publia.instanceid= (
select max (x.instanceid)
from formanswerpersonview x
where x.answerforsubjectid = publia.answerforsubjectid
and x.designguid = publia.designguid
and x.instancestate='COMPLETE'
)
INNER join personOrgRelationshipView
on personview.personid=personOrgRelationshipView.personid
inner join classificationPersonView places
on places.personid=personview.personid
wHERE code='APP'
And status='ACTIVE'
AND endDate IS NULL
order by forename
Clearly the inner joins are fine but it is the left join i am unclear on? any help would be greatly appriciated, as i continue to research
Many thanks
Tim
Hi @tmears ,
Please provide the sample tables and expected output, I will help you achieve it using DAX.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
it's actually the other way around. For the sake of your argument Power BI always does a left join by default*, it's the inner join that you need to work for.
* What actually happens is much more complex, based on the concept of expanded tables, with a sprinkling of Auto Exist .
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
75 | |
60 | |
37 | |
33 |
User | Count |
---|---|
102 | |
56 | |
52 | |
46 | |
40 |