Want to get involved? We're always looking for ideas and content for Weekly Challenges.
SUBMIT YOUR IDEAHello @JoeM I think I'm not too pleased by the suggested Output in the Starter file
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.