cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cparker4486
Helper III
Helper III

Relationship not being applied to some visuals

(This is the second I'm posting this because the first time resulted in an error and the post was lost.)

 

I have a relationship between transaction headers and transaction line items. I'm trying to apply a filter on the line item number field that will exclude transactions that don't meet the criteria. (That's how filters work, right? 😉)

 

Below are my relationship and my report. The card should read fewer than 100 and the map should also be doing the same. You can see that the table is correct (by looking at the sum of QUANTITY).

 

Why is it being ignored for the other visuals?

 

RelationshipRelationship

 

ReportReport

1 ACCEPTED SOLUTION
dm-p
Super User
Super User

Hi @cparker4486,

From looking at your relationship, I believe that the direction between the tables is the issue. If you look at the arrow direction from header to line, this means that the header table can filter the line table, but not the other way around, i.e. the arrow only goes one way. This blog post may explain it better than I can.

You have a couple of solutions (in order of simplicity):

  1. Change the relationship direction from single to bi-directional. While this is possible, it is often discouraged in favour of...
  2. Re-designing the model.
    • Because the header and line tables are essentially 'fact' tables, it is advised to have a 'dimension' table (or similar) that bridges them so that filtering works more intuitively, or, replace both tables with a single table so that you are working at the right level of grain. This latter option might not be ideal depending on your scenario.
    • Again, RADACAD have a great series on these modelling concepts, if you've not come across them to date. This is the most recent post, but it's good to read them through from the beginning (all referenced in the linked post).
    • The 'right' model will vary depending on your particular use case but the above dimensional modelling principles are a great way to structure your data so that it is its most malleable.

I hope this sets you off in the right direction. Good luck!

Daniel





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

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




View solution in original post

3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hi @cparker4486 ,

You can also take a look at following document about power bi interaction to confirm if you turned off interaction between these visuals.

Change how visuals interact in a Power BI report

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
dm-p
Super User
Super User

Hi @cparker4486,

From looking at your relationship, I believe that the direction between the tables is the issue. If you look at the arrow direction from header to line, this means that the header table can filter the line table, but not the other way around, i.e. the arrow only goes one way. This blog post may explain it better than I can.

You have a couple of solutions (in order of simplicity):

  1. Change the relationship direction from single to bi-directional. While this is possible, it is often discouraged in favour of...
  2. Re-designing the model.
    • Because the header and line tables are essentially 'fact' tables, it is advised to have a 'dimension' table (or similar) that bridges them so that filtering works more intuitively, or, replace both tables with a single table so that you are working at the right level of grain. This latter option might not be ideal depending on your scenario.
    • Again, RADACAD have a great series on these modelling concepts, if you've not come across them to date. This is the most recent post, but it's good to read them through from the beginning (all referenced in the linked post).
    • The 'right' model will vary depending on your particular use case but the above dimensional modelling principles are a great way to structure your data so that it is its most malleable.

I hope this sets you off in the right direction. Good luck!

Daniel





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

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




This explains a lot. I've come across this issue multiple times in the past with different data and I'll always ended up working around it. Now I'll have a chance to fix this properly!

 

I wonder if this will make Power BI crash less...? That would be a nice side effect!

Helpful resources

Announcements
August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 24 without aka link and time 768x460.jpg

Ted's Dev Camp - July 28, 2022

Watch Session 24 of Ted's Dev Camp along with past sessions!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors