1

I need a help here. I have 3 datasets in power BI having relationships. Now, I have to use these power BI datasets in Power BI Report Builder. I need to join these three tables using DAX only in Power BI Report Builder. I am trying the below code but the code only works with two tables. How to join the 3rd table?

DAX query that does not work -

EVALUATE NATURALLEFTOUTERJOIN(
 'PortalUser_SiteInformation',
 'OverviewTrainingCompleted',
 'CourseDetails'
 )

The above code works if I remove 1 table from the above query.

Below is the screenshot of relationship between these tables:-

All 3 tables have relationship with column User_id. Below is the screenshot of Power BI Report Builder

I Know how to join tables in PowerQuery but I have only option to join in Power BI Report Builder. Please help me to join these three tables in DAX.

Thanks in Advance..

sam
  • 1,242
  • 3
  • 12
  • 31

1 Answers1

5

You need to check the requirements for the join conditions in DAX for NATURALLEFTOUTERJOIN():

FullJoinConditions

It seems that Your Middle Table(PortalUser_Siteinformation) has a different column name than the other 2.

I recommend you to check full requirements(column names, data types, lineage etc.. ) of your tables involved.

And after fixing that, You can try this DAX Code:

EVALUATE
NATURALLEFTOUTERJOIN (
    NATURALLEFTOUTERJOIN (
        'PortalUser_SiteInformation',
        'OverviewTrainingCompleted'
    ),
    'CourseDetails'
)
Ozan Sen
  • 2,477
  • 2
  • 4
  • 16
  • I seriously don't know how to thankyou.. You helped me in getting out of this problem.. Your solution worked like a charm.. – sam Aug 27 '22 at 18:02
  • I am deleting the images I attached because my problem is now solved – sam Aug 27 '22 at 18:05
  • Hi, @sam. I am pleased to hear that your problem is solved. Personally, DAX should make it easier to use sql joins without too many details, however current situation pushes people to conform to strict restrictions to use them. Yeah, you can delete images safely.:) – Ozan Sen Aug 27 '22 at 18:33