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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
ahanfouf
Frequent Visitor

Userelationship connection causes multiplied values

I have two tables:

1. Connections (information on connected person, time etc.)

2. Message Classification (Unique messages sent)

 

 

Now I want to see all connections, that don't have a message yet.

 

So far so good:

Tables can be linked via URL. It is a one-to-many relationship (1 side: Connections, many side: Messages).

ahanfouf_1-1701170363079.png

 

Due to some other relationships I can only use an inactive relationship and make use of the USERELATIONSHIP Function. 

 

This is my measure:

 

 

Persons w no Mess = CALCULATE(
  DISTINCTCOUNTNOBLANK(Connections[URL])
 

    , USERELATIONSHIP(Connections[URL], 'Messages Classification'[Contacted Person URL])
  )

 

 

 

But I always receive too many values for the messaged person. I get all possible combinations in my output table (like the full scalar value) and I don't know why, since there is a valid connection between these two tables...

 

This is the output:

ahanfouf_0-1701169883479.png

 

I only want to retrieve one single row per Connection. And if there is no message for a connection, than show blank as message column. 

 

Hope you get what I mean and can help 😊 

 

1 REPLY 1
lbendlin
Super User
Super User

Due to some other relationships I can only use an inactive relationship and make use of the USERELATIONSHIP Function. 

 

That's not what USERELATIONSHIP is for.  Its main purpose is to switch connections between two tables.   Let's say from the Calendar Date to either the Order Date or the Ship Date.  Yes, you can use it to "switch on/off"  a single relationship but ONLY if switching that on will not result in a circular reference/path ambiguity.  Which is most likely what happens in your scenario, leading to the cartesian result.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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