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
September Update

Check it Out!

Click here to learn more about the September 2022 updates!

Power BI Show Episode 10 Recap

The Power BI Community Show

Watch the playback when Amit Chandak, a Power BI Super User, demos how to use Field Parameters to make reports more dynamic.

Power BI Dev Camp Session 26

New Date - Check it Out!

Mark your calendars and join us on Thursday, October 6 at 11a PDT for a great session with Ted Pattison!

Health and Life Sciences Power BI User Group

Health and Life Sciences Power BI User Group

Power BI specialists at Microsoft have created a community user group where customers in the provider, payor, pharma, health solutions, and life science industries can collaborate.

Top Solution Authors