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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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