cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

I want to reference from two columns in a table to a column in another table

I have two columns in a table. Both columns have a user ID.
・ [Messages.reactions.user.userid]
・ [Message.from.user.id]

I want to get the DisplayName from the Users table using these user IDs. T

[The person who reacted] column
LOOKUPVALUE (Users [displayName], Users [id], ReactionsToMessages [Messages.reactions.user.user.id])

[Reacted person] column
LOOKUPVALUE (Users [displayName], Users [id], ReactionsToMessages [Messages.from.user.id])

As a result, an error occurred only for [the person who reacted]. The error message is as follows.

 

"The following syntax error occurred while parsing: invalid token"

To avoid this error I tried creating a relation between Users [id] and ReactionsToMessages [Messages.from.user.id].

However, the following error message was displayed. I do not know the intent of this message.

 

"You cannot create a direct active relationship between ReactionsToMessages and Users because there is already an active set of indirect relationships between these tables."

How can I achieve my goal?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Helper I
Helper I

Re: I want to reference from two columns in a table to a column in another table

Hi @wataruf,

 

while I'm too inexperienced in DAX and thus don't know a syntax error occurs, the reason why the message You cannot create a direct active relationship between ReactionsToMessages and Users because there is already an active set of indirect relationships between these tables. is displayed is: 

Users is connected to a table X and the table X is connected to ReactionsToMessages or

ReactionsToMessages is connected to a table X and the table X is connected to Users.

 This means that with table X, you have a indirect relationship between Users and ReactionsToMessages.

 

To successfully create a relationship between your two tables, delete the indirect link by deleting at least one of the two connections with the table X.

View solution in original post

6 REPLIES 6
Highlighted
Helper I
Helper I

Re: I want to reference from two columns in a table to a column in another table

Hi @wataruf,

 

while I'm too inexperienced in DAX and thus don't know a syntax error occurs, the reason why the message You cannot create a direct active relationship between ReactionsToMessages and Users because there is already an active set of indirect relationships between these tables. is displayed is: 

Users is connected to a table X and the table X is connected to ReactionsToMessages or

ReactionsToMessages is connected to a table X and the table X is connected to Users.

 This means that with table X, you have a indirect relationship between Users and ReactionsToMessages.

 

To successfully create a relationship between your two tables, delete the indirect link by deleting at least one of the two connections with the table X.

View solution in original post

Highlighted
Regular Visitor

Re: I want to reference from two columns in a table to a column in another table

Hi, @Zlus 

 

Thank you for your reply.

This leaves me with a question of how to get both Users [DisplayName] in these two columns.

Highlighted
Helper I
Helper I

Re: I want to reference from two columns in a table to a column in another table

Hi @wataruf,

 

if you have created a active relationsship between the two tables, you can select both columns of the different tables in a visual and there will not be any error (Unless you have a many-to-many-relation or the visual can only show one value).

Highlighted
Regular Visitor

Re: I want to reference from two columns in a table to a column in another table

Thank you for replying again.

However, I'm sorry.
I do not know how to operate.
I check the manual that describes how to operate Power BI.

Highlighted
Helper I
Helper I

Re: I want to reference from two columns in a table to a column in another table

Hi @wataruf,

 

I'm not sure what you want to do. But for example, if you want to show the value "DisplayName" with "UserId", you can use a table visual. If you create a table and click on it, you can choose which columns should be displayed. If you select "DisplayName" and "UserId", the table will show an error because the two columns are from different query tables. However, if you have created an active relationship between the two query tables, the table visual can show "DisplayName" with "UserId".

Highlighted
Regular Visitor

Re: I want to reference from two columns in a table to a column in another table

Hi,@Zlus 

 

Thank you for your kind response.
I want to close this case.

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Top Kudoed Authors