Forum Discussion

MCALDERON's avatar
MCALDERON
Frequent Visitor
3 years ago

Power Bi connection + sql connection failing

Hi, 

 

I currently connect to a power bi data set and also  to a SQL database, I create a one to many relationship. It works fine if I combine columns comming from both sources but I need to create a calculated column on the sql table that calls a column on the power bi dataset, I do it with the function RELATED() that should works fine but I get this error The column 'people_dim[scorecard_region]' either doesn't exist or doesn't have a relationship to any table available in the current context.

Here is the relationship:

 

As you can see is a simple relationship and as mention if I combine email from chats and employee type from people the visualization works fine, meaning the relationship is working as expected but not working with the function, any idea?

 

the calculation I tried 

region = RELATED(people_dim[scorecard_region])

 

 

 

1 Reply

  •  

    I need to create a calculated column on the sql table that calls a column on the power bi dataset

     

    You CAN create calculated columns from Direct Query data sources but ONLY if the calculated column is based on column values FROM THE SAME ROW in that table.  You cannot do that across rows or across data sources.