We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Checking if a user has all items in a category (subset match across two lists)

alasweileh
6 - Meteoroid

I'm trying to build a workflow that determines whether a user is a member of a category, based on whether they have all the items required for that category.

Each category has a list of required items, and each user has a list of items they own. A user is considered a member of a category only if they have every item that belongs to that category.

 

The goal:

I want to output which users are members of which categories. A user is a "member" of a category only if they have all items associated with that category.

 

Example:

 

Category-Item Mapping (Each Category–Item combination is unique, but the same item can belong to multiple categories) 

Category

items

A

1

A

2

A

3

B

3

B

4

B

5

 

User-Item Data (Each User–Item combination is unique, no duplicates)

User Item
UserA1
UserA2
UserA3
UserA4
UserA5
UserB1
UserB5
UserC3
UserC4
UserC5
UserD18

 

 

Expected Output:

User

MemberOf Category

UserA

A

UserA

B

UserB

N/A (or empty... don't matter)

UserC

B

UserD

N/A (or empty... don't matter)

 

I need help designing a workflow in Alteryx that can:

  1. Compare user items against category item sets
  2. Check if the user has all items from a category
  3. Return which users are members of which categories
10 REPLIES 10
alasweileh
6 - Meteoroid

@Gaurav_Dhama_ 

thanks, that works.

Labels
Top Solution Authors