# Weekly Challenge

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

We're actively looking for ideas on how to improve Weekly Challenges and would love to hear what you think!

Submit Feedback
We've recently made an accessibility improvement to the community and therefore posts without any content are no longer allowed. Please use the spoiler feature or add a short message in the message body in order to submit your weekly challenge.

## Challenge #229: Trend Analysis

Highlighted
8 - Asteroid

Hi! Here my solution 🙂

Highlighted
Alteryx Partner

Enjoyed this one - have never had to manually calculate a trend line before.

A few minor cosmetic tweaks, and used the batch feature of the interactive chart tool for the first time.

Spoiler

Highlighted
11 - Bolide
Spoiler

Sam 🙂

Highlighted
13 - Pulsar

I didn't want to combine or calculate the data twice, so I put the calculation into a standard macro.

Spoiler

Highlighted
Alteryx Certified Partner

Challenge 229 is done, thanks @AngelosPachis for explaining the trend line equations!

Workflow:

Spoiler

Output:

Spoiler
Highlighted
8 - Asteroid

interesting challenge, I learnt a lot

Highlighted
6 - Meteoroid

Enjoyed the challenge of formatting.

Highlighted
Alteryx Partner

Here's my solution and output.

Spoiler

Highlighted
11 - Bolide

Interesting challenge - thanks @wwatson!

Spoiler
As others did, I recognized the formula as a least-squares regression line, so I also used the Linear Regression tool to generate the trend values. For this particular problem, the standard tools were much faster than the predictive tools.

Also, as others did, I packaged the chart creation in a macro, so it could be reused for multiple KPIs. Of course, in this case, there isn't a real business reason to let the user pick between predictive vs. standard tools, since they produce the same output! I just wanted to keep it all in one workflow, since the spirit of the challenge was to use standard tools. Plus, it's always good to get some practice with the Detour tools!

Macro:

Outer workflow:

Output:

Spoiler
Truncated y-axis on an area-based chart is a pet peeve of mine, so, like many others, I chose to start both axes at zero 🙂

Highlighted
Alteryx Certified Partner
Spoiler