cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
addd123 Frequent Visitor
Frequent Visitor

Retreive values based on relation in different tables

Hello,

 

 

Im facing the following problem.

 

I have two tables related by the function columb. 

 

table 1:                

1.1 name     1.2 Function    1.3 Result

Mark                     A                    1

Bella                      B                    3

Chris                     A                     3

 

table 2:

2.1 Function           2.2 Reference Result

A                                         2

B                                         3

C                                         1 

 

Im am using a filter on 1.1 name to display individual results.

 

I would like to then use the 1.2 Function of the 1.1 Name to retreive the value in in 2.2 Reference Result. 

 

Thanks for the help!

1 ACCEPTED SOLUTION

Accepted Solutions
Moderator v-caliao-msft
Moderator

Re: Retreive values based on relation in different tables

@addd123
This could be done by creating relationship between those two tables.
Load those two tables into Power BI desktop, then on the left side, click on the relationship tab,
Capture.PNG
After that, click on the Manage Relationships, then the relationship Windows would appear:
Capture1.PNG
Once created the two tables, Power BI desktop would automatically create the relationship based on the table columns, which we could modify later.
For the detailed information regarding the tab, please check the article below:
Create and manage relationships in Power BI Desktop
The results should be:
Capture2.PNG
If any further questions, please feel free to post back.

 

Regards,

Charlie Liao

1 REPLY 1
Moderator v-caliao-msft
Moderator

Re: Retreive values based on relation in different tables

@addd123
This could be done by creating relationship between those two tables.
Load those two tables into Power BI desktop, then on the left side, click on the relationship tab,
Capture.PNG
After that, click on the Manage Relationships, then the relationship Windows would appear:
Capture1.PNG
Once created the two tables, Power BI desktop would automatically create the relationship based on the table columns, which we could modify later.
For the detailed information regarding the tab, please check the article below:
Create and manage relationships in Power BI Desktop
The results should be:
Capture2.PNG
If any further questions, please feel free to post back.

 

Regards,

Charlie Liao