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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
UrosB
New Member

Help with filtering/DAX - analyze baskets of shoppers who have a specific product in the basket?

Hi, I have a dataset of shoppers and their purchases. Something like the example table below.
 
I need to do basket analysis of shoppers who have bought a specific item, e.g. Item 1 in the example. That means that for my analysis I need to include shoppers 1&3 and all their purchases (items), but omit shopper 2 and all his items.
 
I'm struggling to find a scalable way of doing this, without hard coding anything. Ideally I need a slicer to select a product i.e. shoppers of that specific product to do further analysis.
 
Thanks, Uros
 
ShopperItem
shopper 1item 1
shopper 1item 2
shopper 1item 3
shopper 2item 3
shopper 2item 4
shopper 2item 10
shopper 2item 11
shopper 3item 1
shopper 3item 10
shopper 3item 14
 
2 ACCEPTED SOLUTIONS
V-lianl-msft
Community Support
Community Support

Hi @UrosB ,
 
This article can help you better understand the principle and solve the related problems in the future.
 
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

an update - inspired by your posts, I was able to find a simple solution. Briefly:

  1. created a "filter table" with shopper ID and item ID
  2. made a relationship between the "shopper" column in the main table and the filter table
  3. by selecting an item in the filter table, I filter only shoppers who have the item in the basket.

This seems to work, thanks big time @V-lianl-msft @littlemojopuppy !

View solution in original post

10 REPLIES 10

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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