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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Related Not Working in DirectQuery for One to Many Relationship

Hey everybody. I am working on a report which involves showing orders and the users that enter them. They way our data model is configured is:

 

Table (Key Column)Database
Orders (Ord_Entry_User_Key)DB_1
Users (User_Key)DB_2

 

We are able to create the join between the tables and use fields from the Users table in visuals that have data from Orders without a problem (shown below)

ajcooper35_0-1657214468932.png

 

The issue we are hitting is we need to implement conditional logic that uses the _TrueFill calc column from Orders, and the User_ID_No_Domain column. When trying to implement this logic using RELATED, we get the below error. 

ajcooper35_1-1657214565894.png

 

The assumption is that this will not work because Users and Orders are in different databases.

 

To try to work around that, we created a view in DB_1 called PBI_Users (same as orders) that queries DB_2 for users.

Table (Key Column)Database
Orders (Ord_Entry_User_Key)DB_1
PBI_Users (User_Key)DB_1

ajcooper35_2-1657214754296.png

 

We are able to addfields from PBI_Users just like users, but we are still not able to use RELATED.

ajcooper35_3-1657214816275.png

 

We also tried merging the query in Power Query and got the below error:

ajcooper35_4-1657214839618.png

 

Is this a known issue and by design? It seems very strange that you can use the fields together if they are in different databases but in the same data model, but unable to use Related. Even stranger that even though the view is in the same database as Orders, it does not work.

 

Thanks all.

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

It seems Limited relationships between table1 and table2. Table expansion never occurs for limited relationships. So, you can not use RELATED().

vchenwuzmsft_0-1657617760339.png

 

For more details, you can refer these links.

Model relationships in Power BI Desktop - Power BI | Microsoft Docs

RELATED function (DAX) - DAX | Microsoft Docs

 

Best Regards

Community Support Team _ chenwu zhu

 

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

View solution in original post

4 REPLIES 4
Jon_vB
Helper II
Helper II

I see this issue as well.   I have data in the PBIX dataset and then I am trying to use Reference data that is in a DataFlow, and trying to use direct query so that I can update the reference and the report will show new info (hopefully!).

 

Related did not work, despite being able to make the relationship.

 

LookUpValue seems to be working. 

amitchandak
Super User
Super User

@Anonymous , I was able to use related for a new column. example https://www.youtube.com/watch?v=aA4ROG9dg8A

 

is it a column of measure? In case of measure, you need use some aggregation

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak I appreciate it, but your video does not help. My question is related to DirectQuery across two different databases, and your video is all from the same database with the exception of the import table.

 

My issue is: Table 1 is in DB_1. Table 2 is in DB_2. Both are Direct Query. I cannot use RELATED because they are in different DBs (same server). Even if I create a view of Table 2 in DB_1, it will not work.

Hi @Anonymous ,

 

It seems Limited relationships between table1 and table2. Table expansion never occurs for limited relationships. So, you can not use RELATED().

vchenwuzmsft_0-1657617760339.png

 

For more details, you can refer these links.

Model relationships in Power BI Desktop - Power BI | Microsoft Docs

RELATED function (DAX) - DAX | Microsoft Docs

 

Best Regards

Community Support Team _ chenwu zhu

 

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

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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