What does the DAX function RELATED do in Power BI?
RELATED fetches a value from a related table based on an existing relationship. It helps you bring data from one table into another when they are connected.
Click to reveal answer
intermediate
How does RELATED differ from LOOKUPVALUE in Power BI?
RELATED uses existing relationships between tables to get values, while LOOKUPVALUE searches for values without needing a relationship but can be slower and more complex.
Click to reveal answer
beginner
Can RELATED be used if there is no relationship between tables?
No. RELATED requires a defined relationship between tables in the data model to work correctly.
Click to reveal answer
beginner
Write a simple example of RELATED to get the 'CategoryName' from a 'Categories' table into a 'Products' table.
CategoryName = RELATED(Categories[CategoryName])
Click to reveal answer
intermediate
Why is using RELATED considered efficient in Power BI?
Because it uses existing relationships, RELATED is optimized and faster than searching values manually. It keeps your model clean and easy to understand.
Click to reveal answer
What is required for the RELATED function to work in Power BI?
AA relationship between tables
BA calculated column
CA filter on the table
DA measure in the table
✗ Incorrect
RELATED needs a defined relationship between tables to fetch values.
Which DAX function is best when you want to get a value from a related table using an existing relationship?
ARELATED
BFILTER
CSUMX
DLOOKUPVALUE
✗ Incorrect
RELATED uses existing relationships to get values efficiently.
If there is no relationship between tables, what will RELATED return?
AThe first value found
BBlank
CAn error
DZero
✗ Incorrect
RELATED requires a relationship; without it, it returns an error.
Which of these is a correct use of RELATED to get 'City' from a 'Customers' table?
ACity = RELATED(Sales[City])
BCity = RELATED(Orders[City])
CCity = RELATED(Products[City])
DCity = RELATED(Customers[City])
✗ Incorrect
You use RELATED with the table that has the column you want, here 'Customers'.
Why might you choose RELATED over LOOKUPVALUE?
ALOOKUPVALUE is faster
BRELATED is faster and uses relationships
CRELATED works without relationships
DLOOKUPVALUE is simpler
✗ Incorrect
RELATED is optimized for existing relationships and usually faster.
Explain how the RELATED function works in Power BI and when you would use it.
Think about how tables connect in your data model.
You got /4 concepts.
Describe a scenario where RELATED would not work and what you could do instead.
What happens if tables are not linked?
You got /4 concepts.
Practice
(1/5)
1. What does the RELATED function do in Power BI?
easy
A. It creates a new relationship between two tables.
B. It fetches a value from a related table based on existing relationships.
C. It deletes rows from a related table.
D. It aggregates data within the same table.
Solution
Step 1: Understand the purpose of RELATED
The RELATED function is designed to retrieve a value from another table that is connected through a relationship in the data model.
Step 2: Differentiate from other functions
RELATED does not create relationships or delete data; it only fetches values from an existing related table.
Final Answer:
It fetches a value from a related table based on existing relationships. -> Option B
Quick Check:
RELATED fetches related values = A [OK]
Hint: RELATED pulls data from linked tables only [OK]
Common Mistakes:
Thinking RELATED creates relationships
Assuming RELATED works without a relationship
Confusing RELATED with aggregation functions
2. Which of the following is the correct syntax to use RELATED in a calculated column to get the 'CategoryName' from a related 'Product Categories' table?
easy
A. RELATED('Product Categories'[CategoryName])
B. RELATED(Product Categories[CategoryName])
C. RELATED Product Categories[CategoryName]
D. RELATED[Product Categories.CategoryName]
Solution
Step 1: Recall correct RELATED syntax
The RELATED function requires the table name in single quotes if it contains spaces or special characters, followed by the column name in square brackets.
Step 2: Check each option
RELATED('Product Categories'[CategoryName]) uses the correct syntax. Without quotes around the table name with space it fails, missing parentheses fails, and bracket notation is invalid.
Final Answer:
RELATED('Product Categories'[CategoryName]) -> Option A
Quick Check:
RELATED syntax with quotes = B [OK]
Hint: Use single quotes around table names with spaces [OK]
Common Mistakes:
Omitting quotes around table names
Using dot notation inside RELATED
Missing parentheses after RELATED
3. Given two tables: Orders with columns OrderID, ProductID, and Quantity, and Products with columns ProductID and Price. There is a relationship between Orders[ProductID] and Products[ProductID]. What will the following calculated column in Orders return?
A. The total price for each order line by multiplying quantity with product price.
B. The sum of all product prices in the Products table.
C. The quantity multiplied by the total number of products.
D. An error because RELATED cannot be used in calculated columns.
Solution
Step 1: Understand the relationship and calculation
RELATED fetches the price of the product for each order line by matching ProductID. Multiplying by Quantity gives the total value for that order line.
Step 2: Trace the calculation
The formula computes the total price for each order line row-by-row by multiplying Quantity with the RELATED product Price. It does not aggregate or error out.
Final Answer:
The total price for each order line by multiplying quantity with product price. -> Option A
Quick Check:
Quantity * RELATED(Price) = line total = C [OK]
Hint: RELATED pulls matching row value for each row [OK]
Common Mistakes:
Thinking RELATED aggregates values
Assuming RELATED cannot be used in calculated columns
Confusing multiplication with aggregation
4. You wrote this calculated column in the Sales table:
ProductCategory = RELATED(Product[Category])
But you get an error saying "The column 'Category' either doesn't exist or is not related." What is the most likely cause?
medium
A. The Sales table has duplicate rows causing RELATED to fail.
B. The RELATED function cannot be used in calculated columns.
C. There is no relationship between Sales and Product tables on the relevant keys.
D. The column name 'Category' is misspelled in the Product table.
Solution
Step 1: Analyze the error message
The error indicates that RELATED cannot find a related row, usually because the tables are not connected by a relationship.
Step 2: Check other possibilities
RELATED can be used in calculated columns. Misspelling would cause a different error, and duplicates don't cause this error.
Final Answer:
There is no relationship between Sales and Product tables on the relevant keys. -> Option C
Quick Check:
RELATED needs relationships = D [OK]
Hint: Check relationships if RELATED gives column not found error [OK]
Common Mistakes:
Assuming RELATED works without relationships
Ignoring spelling errors in column names
Blaming data duplicates for RELATED errors
5. You have three tables: Sales (with ProductID and Quantity), Products (with ProductID, CategoryID, and CategoryName), and Categories (with CategoryID and CategoryName).
You want to create a calculated column in Sales that shows the CategoryName for each sale. Which DAX formula correctly uses RELATED to get this value?
hard
A. RELATED(Categories[CategoryName])
B. RELATED(RELATED(Categories[CategoryName]))
C. RELATED(Products[CategoryID]) & RELATED(Categories[CategoryName])
D. RELATED(Products[CategoryName])
Solution
Step 1: Understand the relationships
Sales is related to Products by ProductID, and Products is related to Categories by CategoryID. Products contains CategoryName (likely via its own RELATED to Categories).
Step 2: Use RELATED with the correct direct relationship
RELATED(Products[CategoryName]) fetches from the directly related Products table.
Step 3: Rule out others
A targets an indirectly related table, C uses invalid concatenation on unrelated data, D has invalid syntax.
Final Answer:
RELATED(Products[CategoryName]) -> Option D
Quick Check:
RELATED fetches from directly related table = B [OK]
Hint: RELATED only fetches from directly related tables [OK]
Common Mistakes:
Trying to chain RELATED calls
Using RELATED on unrelated tables
Assuming RELATED can fetch through multiple tables automatically
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.