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
jjjppp
Frequent Visitor

Values replicated across dimension but relationship looks fine

Hi folks,

 

I'm mocking up a dataset to illustrate to someone how they might report on court cases, and the relationship between my two tables is not working. I've had a long day and my brain is fried, so maybe I'm missing something simple, but I just cannot figure out the issue.

 

This is what's happening to my viz: Average of Age measure is replicating across all members of Offense Type. Easy, right? It's probably a problem with the relationship.

jjjppp_0-1647898818657.png

 

Here are my relationship details

jjjppp_1-1647898898246.png

 

I know the values match in each column. I'm quite certain both are text type as well. Does anyone have an idea of why this relationship doesn't seem to be working? I know there are workarounds, but I feel like I'm going crazy as to why this is happening.

 

My apologies if I'm being dumb, but I've been staring at this for twenty minutes, and would like to just phone a friend and end my day. There's a link to a folder containing the file below. Thanks so much!

 

Link to file here: dax questions

1 ACCEPTED SOLUTION
davehus
Memorable Member
Memorable Member

Hi @jjjppp , It's because the relationship type is 1 to many, if you set the cross filter to both, it should work but please validate the results you are getting.

View solution in original post

4 REPLIES 4
davehus
Memorable Member
Memorable Member

Hi @jjjppp , It's because the relationship type is 1 to many, if you set the cross filter to both, it should work but please validate the results you are getting.

Hi @davehus,

 

That did fix it. It makes sense now. I'm so used to using dimensions from the 1 side on the axis.

jjjppp
Frequent Visitor

Hi @davehus,

 

Thanks for taking a look. I should have clarified--I know how to work around this using DAX or by merging the tables in Power Query. My question is why is happening in the first place when everything with the relationship seems in order. Any ideas?

Thanks!

davehus
Memorable Member
Memorable Member

Hi @jjjppp ,

 

Add a calculated column called Age to the case table. Age = Related(Age)

Average Age = AVERAGEX('cases','cases'[Age])
 
davehus_0-1647900144608.png

Please accept my answer if it is what you need.

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.