What is the RELATED Function in Power BI?

Cody Schneider7 min read

Struggling to combine data from different tables in Power BI? If you have information about your products in one table and your sales transactions in another, bridging that gap is essential for meaningful reports. The DAX RELATED function is the single most important tool for solving this exact problem, letting you fetch values from a related table to supercharge your analysis.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

What is the RELATED Function in Power BI?

At its core, the RELATED function acts like a more powerful and intuitive VLOOKUP from your Excel days. It lets you go to a related table, find a corresponding record based on a predefined relationship, and pull a specific value from that record back into your current table.

The magic ingredient, and the absolute requirement for RELATED to work, is having a relationship set up between your tables in Power BI's data model. Specifically, it works along a pre-existing one-to-many (or one-to-one) relationship.

Think of it like this:

  • You have a ‘many’ side: Your Sales table. You can have many sales for one product.
  • You have a ‘one’ side: Your Product lookup table. You have only one row for each unique product.

The RELATED function allows you, while you're working in the Sales ('many' side) table, to "look up" and pull in a value from the Product ('one' side) table. You can grab the Product Name, Category, SKU, or any other detail located in the Product table and bring it over into your Sales table line by line.

Why Is RELATED So Useful?

Learning to use RELATED unlocks a new level of reporting capability and makes creating DAX formulas much simpler. It's not just about moving data around, it's about enriching your data hub to answer more complex business questions.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Enriching Your Fact Table

Often, your primary data table (like a Sales or Transactions ledger) contains just the IDs - a ProductID, a CustomerID, a StoreID. These are great for keeping data clean but terrible for human-readable reports. Using RELATED, you can create new calculated columns in your Sales table for Product Name, Customer City, or Store Manager. This process, sometimes called "denormalization," makes your primary table a one-stop-shop for analysis, simplifying formulas down the line.

Better Slicing and Dicing

Imagine your boss asks for a report showing total sales by product category. The problem? Your Sales table has the total sale amount, but the Product Category lives in your separate Products table. Without RELATED, this is impossible to do easily. By pulling the Product Category into your Sales table, you can suddenly group, filter, and slice your sales data by that new attribute. This opens up countless reporting possibilities, from sales by color to transactions by region.

Simplifying Your Measures

While you can sometimes write complex measures with CALCULATE and FILTER to get at this related data, it's often more efficient and much easier to read if you first prepare your table with calculated columns using RELATED. This approach often leads to better performance and makes your more complex DAX measures shorter and simpler to understand.

How to Use RELATED in Power BI: A Step-by-Step Guide

Let's walk through a common business scenario. You have two tables:

  1. Sales Table: Contains OrderID, ProductID, OrderDate, Quantity, and Unit Price.
  2. Products Table: Contains ProductID, ProductName, Category, and Cost.

The Goal: You want to analyze sales revenue broken down by Category, but the Category column only exists in the Products table.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 1: Check Your Data Model Relationship

Before writing a single line of DAX, you must confirm there is a relationship between your tables. In Power BI, go to the Model view (the third icon on the left-hand pane).

You should see a line connecting your Sales and Products tables, likely on the ProductID column. If you hover over the line, you'll see the connected columns highlighted and an indicator of the relationship type - typically a "1" next to Products and a star (*) next to Sales, indicating a one-to-many relationship. If this line doesn't exist, you must create it by dragging the ProductID from one table onto the ProductID of the other.

This relationship is the foundation, RELATED cannot function without it.

Step 2: Create a New Calculated Column

With the relationship confirmed, go to the Data view (the second icon on the left pane) and select your Sales table. You want to add the product Category to this table.

From the "Table tools" ribbon at the top, click New Column. This will open the formula bar where you can write your DAX expression.

Step 3: Write the RELATED Function

In the formula bar, you'll define your new column. Let's call it Product Category. The syntax is simple:

Product Category = RELATED(Products[Category])

Let’s break this down:

  • Product Category =: This is the name of your new column.
  • RELATED(...): This is the DAX function you're calling.
  • Products[Category]: This is the column you want to pull in. You must specify both the table name (Products) and the column name (Category). Power BI's IntelliSense will help you find this as you type.

Press Enter, and Power BI will evaluate this formula for every single row in your Sales table. For each sale, it looks at the ProductID, travels across the relationship to the Products table, finds the matching ProductID, grabs the value from the Category column in that row, and places it in your new Product Category column in the Sales table.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 4: Use Your New Column in a Report

Now for the payoff. Go back to the Report view. Create a new visual, like a clustered column chart.

  • Drag your newly created Product Category field onto the X-axis.
  • Create a simple measure for total revenue, like Total Revenue = SUMX(Sales, Sales[Quantity] * Sales[Unit Price]), and drag it onto the Y-axis.

Instantly, you have a beautiful chart visualizing your revenue by product category - a task that was previously impossible without first bridging your tables with RELATED.

RELATED vs. LOOKUPVALUE: What's the Difference?

Another function you might come across is LOOKUPVALUE. It can achieve a similar result but works differently and is used in different situations.

  • RELATED: Requires a physical relationship to already exist in your data model. It follows this trusted path, making it simple to write and often faster in performance. When a relationship is there, RELATED is almost always your best choice.
  • LOOKUPVALUE: Does not require a pre-existing relationship. Instead, you tell it which columns to match on as part of the formula itself, like this: LOOKUPVALUE(ResultColumn, SearchColumn1, SearchValue1). It's more verbose and sometimes slower, but it’s invaluable when you cannot create a direct relationship between tables (e.g., to avoid circular dependencies).

Think of it this way: RELATED uses the map you've already built in your model view. LOOKUPVALUE has to be given manual street-by-street directions every time.

Common Errors and Best Practices

If your RELATED formula doesn’t work, it's almost always due to one of these reasons:

  1. No Active Relationship: The most common error message with RELATED mentions that a value can't be determined because there is "no relationship." The fix is simple: go to a model view and create the relationship.
  2. The Wrong Direction: Remember, RELATED travels from the 'many' side to the 'one' side. If you are in your Products ('one' side) table and try to pull a value from the Sales ('many' side) table, it won't work because there could be thousands of matching sales. For that, you would need different functions like RELATEDTABLE or CALCULATE.
  3. Data Type Mismatch: Ensure the linking columns in your relationship (e.g., ProductID) are the same data type in both tables.

Final Thoughts

Mastering the RELATED function is a fundamental step in moving from a beginner to an intermediate Power BI user. It solves one of the most common data modeling challenges by allowing you to easily bring your disparate data tables together, enriching your datasets so you can build more sophisticated and insightful reports.

This whole process - data modeling, understanding relationships, and writing DAX formulas - can have a steep learning curve. At Graphed, we designed a tool that handles these complexities for you. Instead of manually building models and writing DAX, you can simply connect your data sources and ask questions in plain English like, "show me a bar chart of sales by product category." We automatically figure out the relationships between your data to give you instant answers, turning hours of report building into a 30-second task.

Related Articles

How to Enable Data Analysis in Excel

Enable Excel's hidden data analysis tools with our step-by-step guide. Uncover trends, make forecasts, and turn raw numbers into actionable insights today!