Forum Discussion

matd13's avatar
matd13
New Member
6 years ago
Solved

Finding Brands Missing From Stores

Hello Experts:

 

I have a dataset that lists the store number and accompanying brand. I need to find the stores that the brands are not in. Below is an example of the data i have:

 

Store NumberBrand
1A
1B
1C
2A
3B

 

ultimately i would like to be able to select a brand via a slicer or graph, and have a table show me a list of stores that the selected brand is not in. For example if I filter on brand C it will tell me the stores it is not listed in is store 2 and 3.

 

I was thinking having a master table with a list of all the store numbers will help but I'm stumped from there.

 

Thank you in advance for any help!

  • For a basic solution this dax should work:

    # records anti = 
    COUNTROWS (
        EXCEPT ( VALUES ( Brand[Brand] ), VALUES ( StoreBrandLink[Brand] ) )
    )

     with a datamodel like this:

2 Replies

  • For a basic solution this dax should work:

    # records anti = 
    COUNTROWS (
        EXCEPT ( VALUES ( Brand[Brand] ), VALUES ( StoreBrandLink[Brand] ) )
    )

     with a datamodel like this: