Boosting Sales: How ChatGPT and DAX Make Selling Stuff Awesome

Abdulazeezabdullah
Microsoft Power BI
Published in
5 min readAug 11, 2023
Photo by ilgmyzin on Unsplash

In the ever-evolving landscape of commerce, where success is often measured by the ability to offer customers what they need and what complements their desires, the art of cross-selling has emerged as a strategic linchpin. Picture this: a symphony of products, each playing its unique note, coming together to create a harmonious melody that resonates with customers, increasing both satisfaction and revenue.

At the heart of this symphony lies the challenge of identifying the most potent product combinations. It was in pursuit of this virtuosity that a curious convergence occurred — one that brought ChatGPT and DAX into a mesmerizing partnership. This article takes you on a captivating journey through the intertwined realms of artificial intelligence and data analysis as we navigate the corridors of cross-selling ingenuity.

Prepare to be captivated as we recount a narrative that begins with a client’s query, winds through the corridors of business intelligence, and culminates in a plethora of insights powered by ChatGPT and DAX. This narrative follows Abdul’s journey, where he harnessed the potent alliance of ChatGPT and DAX to decode complex product synergies. When confronted with duplicate ranks, Abdul leveraged ChatGPT’s insights to refine his DAX expressions, akin to a strategic football match, resulting in a triumphant unveiling of impeccable cross-selling rankings. This synergy showcases the fusion of human ingenuity and AI prowess, exemplifying the transformative impact of collaborative analytics.

Let’s dive in to unravel the plot twists of duplicate ranks, witness the ebb and flow of analytical thinking, and, ultimately, discover the keys to orchestrating a ranking masterpiece in the world of cross-selling.

Photo by B Mat an gelo on Unsplash

In a previous article, we discovered how to identify how many customers are buying certain combinations of products. Our DAX measure remains the same likewise, the data model.

The dilemma stems from ranking these cross-sold products.

Photo by whoislimos on Unsplash

Let’s rank the most cross-sold product group

The actual ranking is done with the ranking variable, but we are not interested in ranking a product with itself. Hence, the IF statement. The outcome of this measure is as seen below;

With Bubblegum as our base product, the table above shows which product was sold the most alongside Bubblegum to the same sets of customers, i.e. out of all customers who bought Bubblegum, 21 of them also bought S’mores. Hence Bubblegum + S’mores ranks 1st.

Photo by Giorgio Trovato on Unsplash

Going down, we will notice the same no. of customers (20) bought Bubblegum + Chocolate bar, Bubblegum + Chocolate Rugeladh, Bubblegum + Chocolate Truffle, Bubblegum + Nougat & Bubblegum + Rice Krispie treats.

The question then becomes which of these 5 product combinations is ranked 2nd, 3rd, 4th, 5th & 6th.

Photo by Emily Morter on Unsplash

Your guess is as good as mine. There is no way to distinguish them. Hence, the reason why they are all ranked 2nd, and the next group is ranked 3rd.

This is not ideal for us. How, then, can we ensure we don’t have duplicate ranks? Think, think, think, think...

Photo by Thought Catalog on Unsplash

The thoughts are not thoughting. I’ve got a bright idea.

Photo by Lucas Santos on Unsplash

Goes ahead to play I Can’t kill myself by Timaya and log into ChatGPT.

Photo by Jefferson Santos on Unsplash

Here comes ChatGPT to the rescue, but the outcome did not meet the expectations. But the thought process behind ChatGPT solution helped us achieve our end goal.

Let’s dive into this thought process together.

Photo by Andrew Itaga on Unsplash

First, we need to identify the metrics that will be used in distinguishing product groups that fall on the same ranking. In our case, we are sticking with the no. of purchases for the 2nd category in that group. Recall that in our model, the 2nd group of products have no relationship with the sales table.

In order to get the no. of purchases for the 2nd product within each product group. We have to turn off the relationship between the Product table & the sales using the ALL function & establish a relationship between the comparison products & the sales table.

Let’s see its behaviour.

Now that that is out of the way, we need to incorporate this 2nd metric into our ranking. The DAX below helps us with that.

A high constant was introduced because the objective is to change the magnitude. Let’s see how it works.

All that is left is to rank using this Product Position measure.

With this, we’ve ensured we won’t have duplicate ranking.

Imagine a cool mix of AI magic and number crunching that helps organizations sell more things. This article showed how a smart guy named Abdul used ChatGPT and DAX to figure out which products to sell together. Like putting puzzle pieces in just the right way, Abdul used his brain & A.I. to make sure customers got what they want. So, with teamwork between humans and A.I., selling stuff got even better!

Looking for more in-depth analysis and data-driven insights? I’m thrilled to be contributing to the fantastic TA Insight HUB blog! (www.tainsighthub.com) or on Twitter here and linkedIn here

Catch up on everything data from me and other experts over there. Let’s keep the data conversation going!

--

--