Alteryx Formula Add Ons
Set of XML and C++ Based Formula Add Ons for Alteryx.
Suggestions of extra useful functions welcome!!
There is an install.bat script which should promote via UAC, and install the necessary files into the Formula Add Ins directory.
You can uninstall the functions using uninstall.bat script, which again should promote via UAC, and remove the necessary files from the directory.
If the installer script fails, you can manually install it to
%AlteryxBinDirectory%\RuntimeData\FormulaAddIn. You will need to copy all the
Those functions which require the AlteryxAbacus.dll are labelled with C++
A few additional general methods for data preparation.
- Version: Gets the major and minor version of the Alteryx Engine as a number (C++)
- IfNull: If first value is null return second
- Coalesce: Given list of values return first non null value (C++)
- ReportError: Raise an error from a formula if a confition is met, otherwise return a specified value (C++)
Math based functions that I havent got a better home for!
- Modulo: General Double Based Modulo function
- HexBinX: Given an X,Y point and optional radius, get X co-ordinate of hexagonal bin's centre
- HexBinY: Given an X,Y point and optional radius get Y co-ordinate of hexagonal bin's centre
- Rand_Triangular: Given a uniform random number transform into a triangular distributed random
- Avg: Average of a list of values ignoring
- Count: Count of a list of values ignoring
- Sum: Sum of a list of values ignoring
- Deg: Convert radians to degrees
- Rad: Convert degrees to radians
- NormDist: Compute PDF or CDF on Normal distribution
- NormInv: Compute inverse CDF on Normal distribution
- LogNormDist: Compute PDF or CDF on Log Normal distribution
- LogNormInv: Compute inverse CDF on Log Normal distribution
- TDist: Compute two tailed Student T distribution
- TInv: Compute inverse two tailed Student T distribution
- ChiDist: Compute CDF on Chi Squared distribution
- ChiInv: Compute inverse CDF on Chi Squared distribution
Some additional functions for working with Dates and to a certain extent Times.
Date Time Creation Functions (Currently Just Concatenation)
- MakeDate: Create a new date from Year, Month, Day (C++)
- MakeTime: Create a new time from Hour, Minute, Second (C++)
- MakeDateTime: Create a new
DateTimefrom Year, Month, Day, Hour, Minute, Second (C++)
- ToDate: Truncate a
- ToDateTime: Appends midnight to a
Dateto create a
Date Time Parse Functions
- DateFromMDY: Parse a string in Month Day Year format to a Date (copes without leading 0s and different separators)
- DateFromDMY: Parse a string in Day Month Year format to a Date (copes without leading 0s and different separators)
Date Part Functions (returns numbers)
- Day: Get the day of the Month [1-31]
- Month: Gets the month number [1-12]
- Year: Gets the four digit year
- WeekDay: Gets the day of the week [Sunday (0) through to Saturday (6)]
- Quarter: Gets the quarter of the date [1-4]
- OrdinalDay: Gets the day of the year [1-366]
Period Start and End
- WeekStart: Get first Sunday before or equal to date
- WeekEnd: Get first Saturday after or equal to date
- MonthStart: Get First Day of Month
- MonthEnd: Get Last Day of Month
- QuarterStart: Get First Day of Quarter
- QuarterEnd: Get Last Day of Quarter
- YearStart: Get First Day of Year
- YearEnd: Get Last Day of Year
Other Date Functions
- DateAdd: Equivalent to DateTimeAdd but returning a Date
- BusinessDays: Number of weekdays between two dates
- IsLeapYear: Is a year a leap year (takes a year not a date as an input use
A few extension methods for working with strings.
- LeftPart: Gets the text before the first instance of a separator
- RightPart: Gets the text after the first instance of a separator
- Mid: Gets part of a string (wrapper for SubString)
- Split: Splits a string into tokens and then returns the specified instance (C++)
- ToRoman: Given a number between 0 and 5000, convert to Roman numerals (C++)
- FromRoman: Given Roman numeral convert to a number (C++)
- StartsWith: Does a string start with another
- EndsWith: Does a string end with another
- Contains: Is a string in another
Assuming you have the CReW Runner macro, there is a workflow RunUnitTest.yxmd which will run all the test workflows checking the formula add ins.