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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
wpf_
Post Prodigy
Post Prodigy

the column either doesn't exist or doesn't have a relationship....(Even when I have a relationship)

I added a table called 'LeaveReasons' into the model manually by doing "enter data".  I created a relationship with  the 'Request' table.  I linked the table with the common fields.  But when I test in dax to create a new table I am getting msg: the column LeaveReason[category] either doesn't exist or doesn't have a relationship to any table available in the current context. 

 

This is the dax I have:

 

Table =

ADDCOLUMNS(
Request,
"reason", RELATED(LeaveReason[Reason])
"category", RELATED(LeaveReason[Category])
)
 
But it works when i just drag the tables into a table visual.  I want to do a left outter join with them in a variable, and i find it faster this way then to do a join in power query.  
1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @wpf_ ,

 

I believe this is a bug, whereby RELATED() does not work between tables that are mixed Direct Query/Import.

 

You can check issue progress and vote here: https://community.powerbi.com/t5/Issues/DAX-function-quot-RELATED-quot-does-not-work-between-DirectQ...

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

4 REPLIES 4
BA_Pete
Super User
Super User

Hi @wpf_ ,

 

I believe this is a bug, whereby RELATED() does not work between tables that are mixed Direct Query/Import.

 

You can check issue progress and vote here: https://community.powerbi.com/t5/Issues/DAX-function-quot-RELATED-quot-does-not-work-between-DirectQ...

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




@BA_Pete thanks I think you are right.  

VijayP
Super User
Super User

@wpf_  Question is bit confusing. 

Have you created a manual table or created table with DAX? can you share the Model view to see what tables you are dealing with and where is the issue!?




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


@VijayP ,

I cant really share the table because it is a directquery.

I created a table manually by going into "Enter Data".  Then i set the relationship in the model view.  Then to test it in dax, I tried that code in dax studio and in power bi desktop.  In power bi desktop i went to "New Table" and used that code. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors