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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
BIdeveloper999
Frequent Visitor

DAX for transactions that also have other products

Hi,

 

I am trying to create a DAX measure to find out the transactions that had more than 1 product and identify which are those products. My scenario is similar to what customers also bought. For example- One of the transactions have bread, milk, butter then I want to identify that particular transaction that has more than 1 products and also identify those other products along with their quantity and net sales. I have attached the data model sample that I am working with.  Can someone please help? basketanalysismodel.PNG

4 REPLIES 4
BIdeveloper999
Frequent Visitor

This could be the closest solution - https://community.powerbi.com/t5/Desktop/DAX-Function-for-Customers-also-bought/m-p/147454

 

But I do not have product name in my fact table. I have it only in the dimension so this measure in the above link would not work in my case.  Any help would be appreciated!

davehus
Memorable Member
Memorable Member

Hi @BIdeveloper999 ,

 

It sounds to me like you are trying to create a market basket analysis in PowerBI. There are a few articles on this. One example below. 

 

https://finance-bi.com/blog/power-bi-basket-analysis/#:~:text=The%20Basket%20Analysis%20uncovers%20t....

 

HTH

Did I help you today? Please accept my solution and hit the Kudos button.

 

Hi,

 

@davehus  Thank you. This could be one of my solutions at a later stage where I could find the confidence and other metrics . But for now I would like to only identify the transactions which had more than 1 product and also If I select 1 product for example milk. I want to know which other products were bought with them. So I should see bread and butter for example with their quantity and net sales as they were bought along with Milk.  

This could be the closest solution - https://community.powerbi.com/t5/Desktop/DAX-Function-for-Customers-also-bought/m-p/147454

 

But I do not have product name in my fact table. I have it only in the dimension so this measure in the above link would not work in my case. 

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.