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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
MrTD
Frequent Visitor

Relationships issues

Setup: I have a unique identifier in my 'Person' table labelled ID. These identifiers exist in two other tables 'Person Attributes' and 'Person Events' but are not unique.  I have a relationship set from Person to these tables for the ID (one to many).
m6TwNMT
When I try to create a single visual using the ID and any fields from these two tables then the visual messes up with an error.
k8yfbC0
Any advice how I would create this visual/ fix this would be helpful. Much thanks.

9 REPLIES 9
vcastello
Resolver III
Resolver III

Hi @MrTDI think your problem is due to the bi-directional relationship.

 

If you look closer at your photo you'll see that there are two arrows in each line of the relationship. This indicates that the relationship is bi-directional.

Change it to 'One Way'. 

You can do it through ....

1.- Open the relationship tab.
2.- Select one relationship.
3.-Click on edit.
4.- On the bottom-right of the page you'll see something like (I'm translating from spanish) ... Direction of the cross filter. Click there.
5.- Choose One Way.
6.- Click on accept.
7.- Repeat for the other one.

That should work

Hope That Helps

Vicente

@vcastello doesn't solve anything, thanks though!

Hi @MrTD

Then, I'm sorry :- (

I don't know how I can help ...

 

Vicente

Hi @MrTD,

 

 You have unique values on a table and it's detailed in another 2 tables.

Let's take your sample data,

Table1 - ID(unique values)

Table2 - ID, Attribute

Table3 - ID, Travelled

 

Here is the issue,

Attribute and Travelled fields are having text values so we can't aggregate them.

 

Table2 is having 2 'a' values

Table3 is having 3 'a' values

obviously, the system can't detect the relationship between them. Suppose, any one of the tables has measures then it automatically aggregate it based on value 'a'

 

I hope I made it clear.

 

Let me know if you need further help.

 

Regards,

Siva

 

MrTD
Frequent Visitor

Hey @SivaMani, thanks for the response.

 

I see. So Power BI doesn't detect the ID in the ID column even though I set up the relationship for it? A bit annoying hmm.
I've introduced a new column (all 1's) in my attributes table, and set the data type to whole number. By your comment shouldn't that mean that Power BI should aggregate these values and therefore the visual would be shown? 

I've tried this and the same problem still persists so this probably isn't the case. Thanks!

SivaMani
Resident Rockstar
Resident Rockstar

@MrTD,

 

Try Merge Queries. It will help you to achieve this 

MrTD
Frequent Visitor

@SivaMani,  thanks once again!

This isn't optimal with a dataset that has millions of rows with various columns say. This surely would require a large amount of memory which again, isn't optimal! Thanks

SivaMani
Resident Rockstar
Resident Rockstar

Hi @MrTD,

 

It would be easy to help you if you share some sample data.

MrTD
Frequent Visitor

Sure thing!
ID

a
b
c
d
e
f

ID|Attributes

ayoung
atall
bold
bfat
bgrey
cwhite
cears
dhole
epie
frapture

ID|Travelled

aamsterdam
abrussels
aparis
bswitzerland
caustria
ccroatia
cgreece

Relationship should automatically be connected by ID edit: @SivaMani

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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