Want to get involved? We're always looking for ideas and content for Weekly Challenges.
SUBMIT YOUR IDEA
A solution to last week's challenge can be found here.
Challenge #74: Build a Factorial Calculator was published way back in June 2017. It pushed Alteryx designers to make a macro to calculate factorials. A worthy goal, to be sure.
It is time to dust off an old classic and ramp up the difficulty a bit.
My manager, Sydney, is obsessed with iterative macros and wants to see if I can use them properly. Sydney loves clean workflows, so there may be no other tools on the workflow canvas other than a single input, the macro, and a single output. And finally, my manager is entertained by simple things. Sydney likes the idea of the macro spinning around and around, calculating the factorials one multiplication problem at a time. So, the iterative macro must conduct a single multiplication per input number on each pass.
Are you up to this new challenge?
Here are the original challenge requirements to refresh your memory on factorial calculations:
Factorials are commonly used to calculate the multitude of ways a task can be completed—such as how many possible results could come from shuffling 52 playing cards.
Factorials are usually represented by ‘n!’—n being an integer. If we were looking for the factorial of 4, it would be represented as 4!. To calculate the factorial of 4, the equation is written as (4)*(3)*(2)*(1). The following are some example calculations:
1! = (1) = 1
2! = (2)*(1) = 2
3! = (3)*(2)*(1) = 6
4! = (4)*(3)*(2)*(1) = 24
New Challenge Requirements:
I'm still struggeling with macros. I needed to add an empty "output" column to the input. I didn't figure out how to do it otherwise. I'm looking forward to the other solutions.
Modified my text input to do what I needed.
Fun!! and a great way to start a Monday :D
Here's mine - I did add a field to the text Input so I could keep accumulating the total between iterations while still keeping the label of the original number.