alteryx Community

# 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.

## Challenge #142: Life Certainties - Workflows, Death, and Taxes

Alteryx Alumni (Retired)

Last week's solution can be found here!

This week's challenge is around assigning the right income tax rate to each salary. Your goal is to count the number of people associated with each tax rate.

How many feel at tax time.

In our starting workflow, you'll find three datasets:
1) A grid of 100 employees from 26 companies. Before everyone gets worried, yes, I randomly generate this salary data and it is not representative of the population! Do note that each salary has a 'I' or 'J" representing whether this salary will be filed jointly or individually

2) A list of the company names
3) A tax table with the income rates. Notice that there is not a range in the tax table. You must infer the range based on when the next tax rate starts.

Easy Path:
1) Solve this problem as is.

Hard Path:
1) Do not use: Join, Crosstab, Transpose, Multi-field Formula, or Multi-Row Formula

ACE Emeritus

Why take the easy path when you can do it the hard way? Which, coincidentally, is generally how I approach my taxes.

My solution! Complete with super cute piggy bank macro icon!

Spoiler
Chose to go the batch macro route since all of my favorite pivoting tools were on the do-not-use list... It actually ended up bring a fairly simple solution! Append + Filter achieved the "join" to the tax data, and some Dynamic Select trickery with the batch macro allowed me to calculate data for all company columns without an excessive number of formulas.

This little piggy paid his taxes... and cried wee wee wee all the way home.

Super fun challenge, @JoeM!! I really enjoyed this Monday morning brain teaser :)

Cheers!

NJ

8 - Asteroid

Hi all,

My (not at all efficient) solution but still within the rules!

Spoiler

Alteryx Alumni (Retired)

Hello,

Why would you try and make it harder? Alteryx is all about making data challenges as simple as possible.

The real reason I didn't do the hard way was its 5:30pm and I'm a hungry lad.

Solution attached.

14 - Magnetar

Two macro solution. It's fun trying to find a harder solution (which is actually better than what I was trying to do the easy way), to make you think outside the box every now and then.

Spoiler
Chris
Check out my collaboration with fellow ACE Joshua Burkhow at AlterTricks.com
12 - Quasar

I like regex!

Spoiler

11 - Bolide

Cheers! I went with the hard path, and here is what I came up with...

Spoiler
I decided to use an iterative macro to stack the company columns and then I brought it all back into the workflow. My Iterative MacroMy Workflow
Alteryx

Using the second path and discovering a new tool.

ACE Emeritus

Took the hard way!

Alteryx Alumni (Retired)

@WilliamR, I put all the restrictions to see if I could get people to discover a tool that would make their life easier. It was not Arrange that I was aiming to have people discover, but when I was thinking about disallowing it for the 'hard' way, I decided it was also a handy tool to have exposure to. I just didn't think anyone would do it (except for the one and only @Joe_Mako of course)!