Basket Analysis - same products more than 1 in basket

Hello everyone,

I have been trying to solve this problem, but it is proving to be quite tricky. I have attached pbix file. Here is what I want and here is my data model.
Capture

Using the below example transactions, If I select “Dishwasher” from my “Product” and “Filter Product” table, I want to see 1 transaction to qualify as my basket (xxx123), even though they are the same product. However I want to exclude transaction sss109, ppp666.

pbix file.Basket Analysis.pbix (83.9 KB)

Can you please add images of the exact scenario in Power BI, showing exactly how you want this setup and the issues you are experiencing?

Also what have you attempted so far, can you please add the formulas you have been working on

Without this type of info the question is really venturing into consulting which we want to avoid on the forum. I would like to see more detail if we can.

Please see the below link which cover the scenario in quite a it of detail.

Thanks
Sam

Hi Sam,

I have attached pbix file. E.g. for these set of transactions, my formula shows following


Value against Fridge is showing as 3 which is not correct. It should show as 0. Because its the same product selection from “Product” and “Filter Product” category.

However if there are more than 1 same product in a basket, I want to consider it. Such as in following transaction - . So If i select “Dishwasher” in my Product & Product Filter , it should show as 1 in measure [Basket with Both Products].


Like this :

Basket Analysis.pbix (90.4 KB)

Thanks
Grace

1 Like

It’s honestly a bit confusing what you’re looking to achieve here.

I’ve looked into the model and even though you mention you don’t want this to equal three, the formula is setup to answer it this way because you haven’t selected anything in the filter product slicer

image

Aren’t you literally just looking to calculate if a product appears more than once on a particular order??

After reading this over many times this to me is what you’ve explained rather than basket analysis

Another video to review, specifically on basket analysis. But as mentioned before to me it’s not even clear if this is what you’re looking for.