Ramona
Ramona

Reputation: 335

Joining two tables on specific attribute using DAX

I've got two tables which have the following structure:

In the first table there are users, groups in which the users are members and the domain of the user.

username    memberOf    domain 
--------    --------    ------
user1       groupA      ABC   
user1       groupB      ABC       
user1       groupC      ABC   
user2       groupA      DEF       
user2       groupD      DEF       

In the second table there are groups and the domain of the groups.

groupname    domain   
--------     ------   
groupA        DEF       
groupB        GHI      
groupC        ABC       
groupD        GHI      

Now I want to join my two tables on the groupname i.e. memberOf = groupname.

DAX' NATURALLEFTOUTERJOIN(<table1>, <table2>) would join the tables on their common attributes which means that also the domain would be joined.

Is there a way to join the two tables using a specifid column?

Upvotes: 0

Views: 492

Answers (1)

Olly
Olly

Reputation: 7891

You can join the tables by creating a relationship between them, on the columns you choose:

screen capture of relationship between UserTable[memberOf] and GroupTable[groupname]

Upvotes: 1

Related Questions