Forum Discussion

cparker4486's avatar
cparker4486
Icon for Helper III rankHelper III
7 years ago
Solved

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 t...
  • dm-p's avatar
    7 years ago

    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