Forum Discussion
Filter Child back to Parent(s) without using bidirectional?
What is the "easiest" way to enable filtering on the child record so that selecting a child record will filter the parent(s)?
In this scenario, not all parent records have children.
I have a mockup with Customer and Payment Method, I'd like to be able to click on a child Payment Method and see all the Customers (parents) who used that payment method.
I can filter parent to child of course (selecting Jane shows Cash, Credit, Debit)
But, what about selecting "Credit" so I can see everyone who used that?
I could add a count of Payment Methods to the Customer data grid, but I have to instruct it to show items with no data or it will hide all the parents without children. If I show items without data it won't filter either, it will just show counts.
*Granted, in the real world you should not have customers who have no payment method, this is just a mockup example.
Just realised your need to show parents without children. Will see if I can modify.
Think this works:
PaymentMethodFilter = IF (ISFILTERED ( PaymentMethod ), INT ( NOT ( ISEMPTY ( PaymentMethod ) ) ), 1 )
3 Replies
- bcdobbs
Community Champion
If you create a measure like
ParentFilter = INT ( NOT ( ISEMPTY ( 'Customer Payment Methods' ) ) )and put it on the visual level filter of a parent visual (or slicer) with it set to "Is 1" you should get the desired interaction.