Some of the data challenges I faced involved mathematical problems, and there were times when I needed to use prime numbers. However, finding prime numbers in Alteryx is quite difficult. The available method is using the Macros and/or the Generate Rows tool, which is time-consuming and not practical for large primes.
So, I decided to create an original function 'IsPrime' using the Custom Formula Function(by C++ DLL) to check for primality, and I'm sharing it here in the hope that it might be helpful to others.
The attached ZIP file contains IsPrime.xml and IsPrime.dll. With reference to this web site, save these files in the proper folder to enable the custom formula function in your computer.
https://help.alteryx.com/current/en/designer/functions/build-custom-formula-functions.html
I've also attached a sample WF for your reference, that is to find prime numbers less than 100 million. It takes about 10 seconds(As it uses C++ native language, it's very fast)
Hope it would help!
That is impressively fast. This will be a very useful function for both build and run time, thank you for sharing @gawa
Excellent add-on!! We should have this built in for Alteryx!