Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
SevsBo
Helper V
Helper V

RELATED bug on calculated tables from live connection model

We've build a model that uses a live connection to a few other models. We then used SELECTCOLUMS to create two calculated tables derived from those models, to review data and build reporting off. And finally, we connected two of those tables together.

 

One of the calculated tables uses a calculated column with RELATED to bring in columns from a one of the other calculated tables.

This all worked fine when built, but today the same calculated table is returning an error: 

 

SevsBo_0-1752160155396.png

 

Meanwhile, here is how two two calculated tables actually appear in the model:

 

SevsBo_1-1752160244941.png

 

They are linked and the link works fine if we build a table visual.

 

Any ideas why DAX is playing up when it worked originally?

 

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @SevsBo 


You're encountering this issue because the RELATED() function only works when there's a single-direction, many-to-one relationship from the current table to the lookup table. In your model, it appears that the relationship between Att_Inactive_Subaccounts and AttritionTable is many-to-many, which breaks RELATED().

To work around this, you can:

Use an iterative + aggregation pattern with RELATEDTABLE() and something like MINX, MAXX, or SELECTCOLUMNS, for example:

IF(
ISBLANK(
MINX(
RELATEDTABLE(AttritionTable),
AttritionTable[Subaccount ID]
)
),
"Inactive",
"Active"
)

Or: If possible, restructure the relationships in the source model (where the data is authored) to enforce a proper many-to-one direction. This may require help from the dataset owner or data modeler.

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

3 REPLIES 3
Ritaf1983
Super User
Super User

Hi @SevsBo 


You're encountering this issue because the RELATED() function only works when there's a single-direction, many-to-one relationship from the current table to the lookup table. In your model, it appears that the relationship between Att_Inactive_Subaccounts and AttritionTable is many-to-many, which breaks RELATED().

To work around this, you can:

Use an iterative + aggregation pattern with RELATEDTABLE() and something like MINX, MAXX, or SELECTCOLUMNS, for example:

IF(
ISBLANK(
MINX(
RELATEDTABLE(AttritionTable),
AttritionTable[Subaccount ID]
)
),
"Inactive",
"Active"
)

Or: If possible, restructure the relationships in the source model (where the data is authored) to enforce a proper many-to-one direction. This may require help from the dataset owner or data modeler.

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Hi @Ritaf1983 
I'm not sure about the single-direction bit, but I think you're spot on regarding many-to-many! Example of a working bidirectional one-to-many relationship is below:

 

SevsBo_1-1752228235822.png

 

 

SevsBo_0-1752228222858.png

 

johnt75
Super User
Super User

RELATED will only work across a regular relationship, from the many side to the one side, and you have a many-to-many relationship. You could use LOOKUPVALUE or SELECTCOLUMNS with FILTER to get the value.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors