DAX Concept

Enhancing Chart Labels with RELATED and Concatenation in DAX

Learn to use the RELATED function in a DAX calculated column to concatenate related data from multiple tables, creating more informative chart labels.

BeginnerRELATED

Concept Breakdown

The RELATED function allows you to access values from a related table within the current row context. It's particularly useful in calculated columns when you need to pull in information from the 'one' side of a one-to-many relationship, such as adding city and country names to a building's record from dimension tables.

What You Will Learn

  1. Understand when to use RELATED in a Power BI model.

  2. Practice the concept inside a real PBIX report rather than only reading syntax.

  3. Complete a beginner-level task and verify the result with a hidden answer check.

Practice in Power BI

The starter PBIX link has not been attached yet. The student workflow is ready for the admin to connect the file.

  1. Download and unzip the provided 'Tallest Buildings - Related.pbix' file and open it in Power BI Desktop.

  2. Locate the 'Building' table in the Data view or Model view.

  3. Add a new calculated column to the 'Building' table and name it 'Name and location'.

  4. Initially, use the '&' operator to concatenate the 'Building Name' with a comma and a space (", ").

  5. Edit the formula to concatenate the City Name to the end of the string using the RELATED function (e.g., RELATED(Cities[City Name])).

  6. Further edit the formula to include another comma and space, followed by the Country Name using the RELATED function (e.g., RELATED(Countries[Country Name])).

  7. Navigate to the report view and select the chart showing building heights.

  8. Replace the column currently used for the Y-axis (Building name) with your newly created 'Name and location' calculated column.

  9. Observe the updated chart labels which should now display the building's name, city, and country.

Starter DAX

Buildings[Building Name] & ", "

Expected Outcome

A calculated column in the Building table named 'Name and location' displaying concatenated values like 'Building Name, City, Country'. The chart's Y-axis labels will be updated to use this more informative column.

Checking your sign-in status...