community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Building Pascal's triangle in Alteryx

Magnetar
Magnetar

This is just an example that I'm uploading here so I can show it to @jdunkerley79.


This macro leverages an iterative macro (and a very small batch macro) to dynamically build pascal's triangle up to 34 steps (since after this you start running into overflow issues that I didn't want to solve).

 

This was a personal test workflow that I put together for my own education, so apologies in advance for the lack of documentation and messy design.

ACE Emeritus
ACE Emeritus

Very cool!  I always thought it was interesting how an iterative macro in Alteryx is essentially a form of recursion.  I used that idea, also just for my own edification, to build a recursive prime factorization macro (attached).  Nothing fancy in my algorithm and it absolutely bogs down for large numbers (that aren't truly really even all that large, so anyone curious should use existing R or Python packages if they really want to factor numbers in a production workflow.)  But similar to your example, it was a really fun exercise for me.  I did try to document each step as well. Thanks for sharing your work; hope to see some other things added here.

 - John

 

Labels