alteryx Community

# Weekly Challenge

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
###### IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

## Challenge #8: Aggregate Consumer Purchases

7 - Meteor

Similar to others!  The cross tab tool is essential here!

Spoiler
6 - Meteoroid

I used formula tool in order to check if ticket ID meets the condition

Spoiler
This is the expression I used to check ticket ID. It's kind of complex but it still works:)

MAX(
ABS(!IsEmpty([Pizza])),ABS(!IsEmpty([Burger])))
*ABS(!IsEmpty([Side]))
*ABS(!IsEmpty([Drink]))
8 - Asteroid

Great practice on the basics. I was trying to do something very fancy before pressing on the brakes and realizing the question being asked is very simple.

Spoiler

7 - Meteor

This was a lot trickier than initially expected. Got stuck initially figuring each calculation in separate streams but not being sure how to combine them all before figuring out

7 - Meteor

my take on the solution

8 - Asteroid

🙂

7 - Meteor
Spoiler
6 - Meteoroid

Probably not the most slick solution but got there in the end

8 - Asteroid

A couple of gotchas in this one!

Spoiler

When the question says "since June 2013" it doesn't mean, since the beginning of June 2013.
it means "from 1st of July 2013 onwards", or "after the end of June 2013".

I tried to solve this first with a RegEx tool but wasn't able to figure out how to do the OR logic.

The way to structure this is:
Step 1 - build a fact table. That's just the transactional PoS data, with a few extra columns
Step 2-  we can then Cross Tab to "collapse" the transactions and sum to each Transaction, where each Transaction contains (Pizza OR Burger) AND Side AND Drink.

Then it's just case of adding across.

7 - Meteor

Solution to Challenge #8: Aggregate Consumer Purchases