I have a product/customer matrix that shows what products a customer has - I can filter that by product to give me a list of customers.
I have a table of contacts that I want to filter based on the customers that appear in the table above and the contact type filter
At the moment both tables filter but not unless I select a customer in the product/customer table. I want the contact table to filter based on the filters that have been applied to the customer / product table.
How can I do this please
The problem you have with this visual is that the Opportunity table does not (and cannot easily) filter the Contact table.
You are using the Opportunity table to get the activity status for your ‘Contract Status’ visual - and that can filter the Account Name, but that table cannot filter the Contact Type.
However, this measure, added to the Contact visual table will do the trick.
Contact Type filter by Opportunity table =
CALCULATE(
COUNTROWS( Contact ),
TREATAS( VALUES( Opportunity[AccountID] ), Contact[AccountID] ))
Thanks Heather. I’m not sure what that is doing / how it suppose to work
I’ve added that to the visual but when I change the contact type it doesn’t filter the contact table correctly
it returns all the contacts for the given type rather than just for the account in the customer/product table.?
It worked for the billing contact type but not the others
Okay - I had misunderstood what table you were attempting to filter. I saw this message:
and believed that you wanted to filter this table
so that is what is happening - the measure basically creates a temporary relationship between the Opportunity table (which is used in your slicer), and the Contact table (which is the table I thought you wanted to filter).
Please provide a demonstration of what results you expect (even in Excel will be helpful). I’m offline for the rest of the evening, but will check in on this in the morning (Central Time Zone)
Thanks Kumail much appreciated.
It’s not quite working on the Contact Type filter how I would expect.
If I leave the filter off contact type and just filter on the Product - both tables show the correct detail. ie all contacts for the customers in the Customer /Product Table
However, if I then set a filter on the contact type it also changes the customers that appear in the product/customer table
I would expect to see the following in the customer / product table regardless of the filter applied to contact type.
Hi @AliB, did the response provided by @Kumain help you solve your query? If not, how far did you get and what kind of help you need further? If yes, kindly mark as solution the answer that solved your query.
I hope that you are having a great experience using the Support Forum so far. Kindly take time to answer the Enterprise DNA Forum User Experience Survey, we hope you’ll give your insights on how we can further improve the Support forum. Thanks!
I have a question about the relationships - I notice that you have removed the following relationships:
account - opportunity
contact type - contact
account - contact
These are used in other visuals in my production model - should I set them to inactive relationships and try and change all my other measures or would you suggest I have a completely separate model specifically for this problem?
I was trying to go for the Golden Dataset
Hi Kumail
Thanks for all your help so far … contacts is now working (great) but that has made the product filter / contract status filter not work anymore.
It is returning customers that do not have an Active contract for a given product PB Test Model -update.pbix (234.0 KB)
When in fact Account 1 only has 1 Active contract for 1 product
Hi Kumail
I can create another ticket but I think its related to the relationships we now have. Originally the customer/product table was filtering correctly. Now we have made the changes it isn’t ?