Forum Discussion
Basket analysis, trying to set a variable with multiple item combinations
- Anonymous4 years ago
Hello,
Yes, I'd like more help.
I unpivoted the columns and saved as .pbix file but I'm not sure how to include it in a post.
- 4 years ago
You first need to structure your data to look like this.
You can then use a measure like this in a table visual to get the result shown.
ContainsList =
VAR itemstofind = { "avocado", "crackers", "hummus", "peroni" }
VAR thisIDitems =
DISTINCT ( Transactions[Value] )
RETURN
IF ( COUNTROWS ( INTERSECT ( itemstofind, thisIDitems ) ) = 4, "Y", "N" )Pat
You first need to structure your data to look like this.
You can then use a measure like this in a table visual to get the result shown.
ContainsList =
VAR itemstofind = { "avocado", "crackers", "hummus", "peroni" }
VAR thisIDitems =
DISTINCT ( Transactions[Value] )
RETURN
IF ( COUNTROWS ( INTERSECT ( itemstofind, thisIDitems ) ) = 4, "Y", "N" )
Pat
- Anonymous4 years agoNot applicable
Pat,
This worked - thank you so much!
Sarah