Market Basket Analysis in Power BI Cross Selling Matrix For Retail

A cross selling matrix in Power BI is a vital tool for the retail industry, enabling you to visualize and analyze which products are frequently purchased together by the same customers. This type of analysis—also known as market basket analysis—delivers powerful insights that can guide promotions, product placements, and inventory decisions.

Building a Retail Cross Selling Matrix in Power BI

A cross selling matrix helps retailers answer a simple but valuable question: “If a customer buys Product A, how likely are they to also purchase Product B during the same period?” Understanding these patterns allows stores to design smarter upselling strategies and create effective bundles that boost both sales and customer satisfaction.

How It Works

At its core, a cross selling matrix works by tracking customer purchase data to find common purchase combinations. You’ll essentially compare all pairs of products to count the number of unique customers who bought both products in a selected time frame.

Step-by-Step Approach

  1. Prepare the Data Model
  • Ensure you have sales transactions that include at least a product identifier and a customer identifier.
  • Build a product list (dimension) table and a separate transactions (fact) table in your model.
  1. Generate Customer Lists for Each Product
  • For any product, use DAX to create a list (virtual table) of customers who bought it.
  • Do the same for each comparison product in the matrix—these are your “row” and “column” products.
  1. Find Overlaps Using DAX Table Functions
  • Use DAX functions like VALUES() to pull the relevant customer lists.
  • Compare the two lists for every product pair using the INTERSECT() function to find customers who purchased both.
  • The count of intersecting customers is used to populate each matrix cell.
  1. Virtual Relationships for Comparison
  • If your comparison product table isn’t physically connected to the sales table, use TREATAS() within CALCULATETABLE() in DAX to virtually relate them during the comparison.
  • Remove existing context with ALL() where necessary to correctly isolate each calculation.
  1. Dynamic Filtering
  • The matrix remains interactive—choosing different dates or store locations will update results in real time.
  • This adaptability is powerful for seasonality and promotional period analysis.

Example DAX Snippet

Both Products Purchased = 
VAR CustomersProductA = VALUES(Sales[CustomerID])
VAR CustomersProductB = 
    CALCULATETABLE(
        VALUES(Sales[CustomerID]), 
        TREATAS(VALUES(CompareProducts[ProductID]), Sales[ProductID])
    )
RETURN
    COUNTROWS(INTERSECT(CustomersProductA, CustomersProductB))

Adjust table and column names to match your model.

power bi cross selling matrix for retail

Why Retailers Should Use a Power BI Cross Selling Matrix for Retail

  • Optimize Product Placement: Place complementary products near each other to encourage higher basket values.
  • Design Targeted Promotions: Offer discounts or bundles based on frequent purchase pairs.
  • Improve Inventory Management: Stock popular product pairings together to meet customer demand.
  • Enhance Customer Experience: Personalize recommendations for shoppers by suggesting common cross-sells.

Harnessing this approach will empower your retail business to make data-driven merchandising decisions, resulting in increased sales and improved customer loyalty. With a few dynamic DAX formulas and the robust visualization capabilities of Power BI, any retailer can unlock the value hidden in their sales data.

keywords: Power BI Cross Selling Matrix for Retail, Market Basket Analysis in Power BI