Weekly Challenges

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.

SUBMIT YOUR IDEA

Challenge #8: Aggregate Consumer Purchases

parkerjackson42
Meteoro

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

Saqueador
8.PNG
jiuh_park
Meteoroide

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

Saqueador
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]))
AcevedoYo
Asteroide

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.

Saqueador
YomaraA_0-1590582463036.png

 

Rohit_G13
Meteoro

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

 

 

JenThomas
Meteoro

my take on the solution

mhou
Asteroide

🙂

iakovidc
Meteoro
Saqueador
Capture.PNG
Razzle
Meteoroide

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

izamryan
Asteroide

A couple of gotchas in this one!

 

Saqueador
izamryan_0-1590765738028.png


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.

aatef
Meteoro

Solution to Challenge #8: Aggregate Consumer Purchases