Power BI – DAX – RELATED

Leave a comment

Power BI has a RELATED function that allows you to get data from a related table. Let’s go through an example.

We have 2 tables:

  • Goals, which holds salesperson’s goals
  • Sales, which holds sales transactions

The tables have a relationship of the common field Salesperson.

Now, let’s say we want a field in the Sales table which is the Goal field from the Goals table. To do this, create a new Calculated Column:

Then, add the RELATED formula below. When you start typing, Power BI will display the possible fields based on the relationship.

Now, we will drag this new calculated column onto our report. You can see, the new calculated column contains data from the Goal field.

 

ABOUT CARL DE SOUZA

Carl de Souza is a developer and architect focusing on Microsoft Dynamics 365, BI, Web, Cloud and Data Science.

carldesouza.comLinkedIn Twitter | YouTube

 

Leave a Reply

Your email address will not be published. Required fields are marked *