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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

USERELATIONSHIP issues

Hi everyone,

 

For a report on stock flows I need to have the name of both the "From" location and "To" location. Both these entities are related to the same warehouse location dimension. Power BI only allows only 1 single active relationship:

 

So I will need to "calculate" the other name manually. (I can't copy the Warehouse table due to RLS role constraints).

 

I used the following DAX statement to manually force PBI to use the inactive relationship:

 

 

NameTo = CALCULATE(
  VALUES(Warehouse[Name]);
  USERELATIONSHIP(Warehouse[ID]; Flow[To])
) 

 

The result gives me the same name as the active relationship which I don't want.

Can anyone help me with my statement?

 

Thanks in advance,

 

Harm

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Anonymous,

 

I would not use the relation between both table I would do two columns on your data table with the following syntax:

 

From name = LOOKUPVALUE(Warehouse[Name], Warehouse[ID] , Flow[From])

To name = LOOKUPVALUE(Warehouse[Name], Warehouse[ID] , Flow[To])

If you want to use the column with the user relationship you need to make the column on the Flow table and not on the wharehouse table as you have that's why you have the same name always.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





View solution in original post

1 REPLY 1
MFelix
Super User
Super User

Hi @Anonymous,

 

I would not use the relation between both table I would do two columns on your data table with the following syntax:

 

From name = LOOKUPVALUE(Warehouse[Name], Warehouse[ID] , Flow[From])

To name = LOOKUPVALUE(Warehouse[Name], Warehouse[ID] , Flow[To])

If you want to use the column with the user relationship you need to make the column on the Flow table and not on the wharehouse table as you have that's why you have the same name always.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.