# Weekly Challenge

Solve the challenge, share your solution and summit the ranks of our Community!
New content is available in Academy! You may need to clear your browser cache for an optimal viewing experience

## Challenge #196: Determine Profit Margin

Highlighted
16 - Nebula

Thanks for the challenge @Treyson - nice way to start the year!

Spoiler
Not much here that's controversial - only thing to point out is the gap-check to look for missing quarters ( @Treyson was kind, no missing quarters in this exercise).

Highlighted
Alteryx

My solution:

Spoiler

Highlighted
Alteryx Certified Partner

What a nice challenge @Treyson, I was really out on a limb here

Spoiler
So while I was stuck, I noticed that some have used the Tile to solve this, and it gives a much simple solution.
However, I am not so sure that the Tile approach would work unless there is only one date per client per quarter.
So my messy solution ended up looking like this:

Still Climbing
/Thomas

Highlighted
Alteryx Certified Partner

Nice way to get back into the flow after winter vacation!

I took a more drawn out approach and created a macro to assign the Quarter each record, which after seeing some of your spoilers, was way too complicated of a solution.

Spoiler

Highlighted
Alteryx Partner

Probably used too many tools, but a straightforward solution still gets the job done!

Spoiler
Highlighted
15 - Aurora
Spoiler
Highlighted
5 - Atom

Solved!

Highlighted
Alteryx

11 - Bolide

Had to challenge myself on the logic!

Spoiler
Really wanted to avoid converting to a date, but using min on the date prior to converting produced bad results.
Highlighted
8 - Asteroid
Spoiler