Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

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 #63: Data Preperation Using Pivot Tools

DMContente
8 - Asteroid

This was quite a challenge!

jguerrero
Alteryx
Alteryx

My Solution:

izamryan
8 - Asteroid

Hello @JoeM I think I'm not too pleased by the suggested Output in the Starter file

 

Spoiler
izamryan_0-1590354475841.png

because it gives "Total point of sale" for the 24th of April to = 0 across all DMA's.

 

It's because all the other DMA's and weeks have both an "Inside" and an "Outside" POS data point.

 

But for the week of 24 April 2016, that data is missing. Probably because it hasn't yet been included as a column in this starting dataset.

 

Anyhow, in my suggestion I've re-calculated a new total, ignoring the "Null" values and given a column "Checksum" just to be doubley-sure.

For this solution, I've split it into two Containers: 
a. "Identify the columns of DMA data" which ought to scale as more columns of data is brought in; and
b. Re-integrate and pivot the data, which again, ought to scale as more columns of data is brought in.

Again, RegEx to the rescue here!
I used:
(\w{3}.\d{1,},.\d{4}).-.(\w{3}.\d{1,},.\d{4})
and a Replace $2 method to grep out the dates that I wanted.

 

 

iakovidc
7 - Meteor
Spoiler
Weekly challenge 63.PNG
KilianL
Alteryx Alumni (Retired)

My take on Challenge #63

Took me some split-edit-merge parts to make it work.

 

Spoiler
063 - Pivot Tools - KL.png
JeremyGonzva
8 - Asteroid

solution

xinyoo
6 - Meteoroid

this was really difficult

AngelosPachis
16 - Nebula

Challenge #63 solved

 

Spoiler
Annotation 2020-06-04 213036.png
CrazyHokieFan
7 - Meteor

This was great! Cool that there are several ways to get the same answer

Tberney
8 - Asteroid

Why does the transpose tool want to turn my 0's into nulls?

 

Tberney_0-1591566283959.png