cancel
Showing results for 
Search instead for 
Did you mean: 
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 II
Super User II

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

View solution in original post

4 REPLIES 4
BA_Pete
Super User II
Super User II

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

View solution in original post

@BA_Pete thanks I think you are right.  

VijayP
Super User I
Super User I

@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
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.