The Related Function is a DAX function in Power BI that allows you to retrieve related values from a related table in the Data Model.
It is used to establish a relationship between tables based on a common column, and then retrieve related data from one table to another. It comes under Relationship functions category.
Refer similar post – RELATEDTABLE
Sample Data set
Understand the Requirement-
How can we get
Product Name &
Total Sales Amount data from
Product table to
Let’s get started-
Step-1: RELATED function only works if a relationship has been established between the tables, let’s create a relationship between both tables.
Click on data tab > and make relationship based on
Product Id &
ID column in both tables.
Note: Support only One-to-one & One- to-Many relationship.
Once the relationship is established, you can use the RELATED function to retrieve information from the Product table and display it in the Sales table.
Now create few
New column to Sales table and write below DAX-
Product Price = RELATED('Product'[Price])
Product Name = RELATED('Product'[Product Name])
Total Amount = Sales[Quantity]* RELATED('Product'[Price])
Above formula retrieves the Product
Price column from the Product table, based on the established relationship between the Sales table and the Product table.
Refer DAX post:- DAX Tutorials