top of page

A Few Helpful Alteryx Formulas

There are so many different Formulas (or Functions as found in this helpful reference article here.) in Alteryx. Below are just a few helpful functions I use frequently;


1.PadLeft


I use this for sorting later in Tableau or SharePoint. It gets annoying if you have to sort a column with the number 1 and then 10 shows up underneath. It of course converts the format of the column to a string.


PadLeft (String, len, char)

Example: PadLeft ([orderid], 7, 0)



2.DateTimeDiff


If you need to find the days between two dates, use this formula.


DateTimeDiff(dt1,dt2,u)

Example: DateTimeDiff([StartDate],[EndDate],"days")


3.Trim


This is a very helpful formula if you want to strip double or single quotes around text in a cell.


Trim(String, y)

Example Double Quotes: Trim([Quote], '"')

Example Sing Quotes: Trim([Quote], "'")


4.RegEX_Replace


If you ever use SharePoint and need to pull in names that were stored there, you may have to use this function to strip the SharePoint syntax it adds behind the scenes.


REGEX_Replace(String, pattern, replace, icase)

Example: REGEX_Replace([PersonName], '[0-9#;]', '')

487 views0 comments

Comments


bottom of page