Skip to main content
Showing results for 
Search instead for 
Did you mean: 

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Regular Visitor

Identify shops with an inventory overlap

Dear Power BI community,


I am facing an issue where I need to compare which shops have released a specific product and compare which stores have an overlap with other products.

I would like to select a product and compare it across all stores where the product is released to find those stores where other products are also released.


Plain worded example: You are selling a very fancy coffee of a specfifc brand and compare if the same store is selling another brand of coffee 


I would like to display this information in a visual matrix, similar to the one shown below, and calculate ratios of shops that offer other products as well.


Disclaimer: Please ignore the conditional formatting of the cells for now!


Do you have any ideas on what measures I can use to achieve the comparison, so that I can identify the stores that only sell the specific product and those that offer more than one?


My idea of the end result should have a table like this and also to be able to calculate the 2 measures at the bottom: 



To achieve this, I have a table in long form that contains the product, the shop, and the product release date for that particular shop.

Example data set: 


The shop ID is linked to a shop dimension table that contains all the other information related to that particular shop. The external_id, in this particular use case, does not serve any function, and can be ignored if it is not useful in addressing the issue at hand.


Thank you so much for your time and please let me know if you need more context, 



Super User
Super User

Sounds like you're on the right track.  What do you need help with?

Hello Ibendlin,


Thanks for answer!


I am having difficulty finding the DAX code that creates a selected product shop overview and allows me to see the overlap. I am currently stuck because my current matrix compares all products against each other, and I am unsure how to select a specific product.


It should be a dynamic function since I would like to change the selection of produts while using the report. 

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to
Please show the expected outcome based on the sample data you provided.

If you want to get answers faster please refer to

Helpful resources

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors