sam
sam

Reputation: 1304

How to join three tables with relationship using DAX only

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..

Upvotes: 1

Views: 3831

Answers (1)

Ozan Sen
Ozan Sen

Reputation: 2615

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'
)

Upvotes: 5

Related Questions