To create a gap analysis, I want to create a customer-specific table or matrix, showing products for a given customer, and a second one showing all products available in that country.
We have the following tables:
- Customers: Group Name, Parent Name, Company Name
- Countries: Territory, Region, Country Name
- Brands: Brand Group, Brand Name
- Products: Brand Name, Product Name
- Events: value, quantity
I have created the following 2 tables (can change to matrix if need be):
- Customer Table; showing the brands, products & quantity
- Country Table; showing the brands, products & quantity
With the following slicers:
Customer slicer – on table 1 only
Country slicer – on both tables
Brand slicer – on both tables
So far it works well, but I’d like to add a distinct product count to both tables, which should adjust to the slicers.
Then easy comparison is possible on brand level to see if we list all products at customer 1 in country A vs what all retailers (1,2,3,+) have listed as product(s) in country A.
I tried
Distinct Count = DISTINCTCOUNT(Products[Product Name])
and
Distinct Count = CALCULATE( DISTINCTCOUNT(Products[Product Name]), FILTER(Brands, Brands[Brand Name]) = MAX(Brands[Brand Name]))
but it still doesn’t add up correctly!
Femke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.