Overview

Woopra formulas allow you to do row-based calculations in Trend and Profile reports. You can also use formulas to create Custom Event Schema Properties and Custom User Schema Properties.

Trend Reports

In trend reports, you can use formulas to perform any row-based calculations in the Measure By section. If you are looking to transform any dimensions in the Compare By section, you will need to edit these using the Custom Event Schema Properties

🚧

Trend Reports

Trend reports are limited to number type operations only.

You can add a formula by clicking to add a column under the Measure By section. Here you'll select to add a formula.

Once you select to add a formula, you can choose which operation you'd like to perform. In the example below, we simply choose to add the People column + 10.

1265

You can perform any row based operations and even combine multiple operations when using Formulas.

Profile Reports

In Profile Reports, you can use formulas to perform row-based operations using numbers, booleans or strings.

To add a formula, you can click to add a column and select Formulas.

Once you add a formula, you can select which operation you'd like to use. For example, if I wanted to concatenate two columns together, I could use the CAT operations like so:

Operations

These are the various operations you can use when using formulas. Trend Reports are limited to Number type operations only.

OPERATIONDEFINITIONTYPEPARAMETERS
ABSReturns the absolute value of numberNumbernumber Number
ADDReturns the sum of all operandsNumberoperand Object
ANDReturns true if all conditions are true, otherwise falseBooleancondition Boolean
Array_Compact Returns an array with all empty values removedArrayarray Array
Array_JOIN Returns a string with all elements of array joined by delimiterTextarray Array
delimiter Text
Array_Slice Returns a slice of array from start to endArrayarray Array
start Number
end Number
ASCIIReturns only ASCII characters string of text.Objecttext Text
AVGReturns the average of the inputsNumberinput Number
CASTCasts the value at the position array as type postitionObjectarray Object
postition Number
CATConcatenates a list of stringsTextpart Object
CEILRounds number upNumbernumber Number
CHAR_AT Returns char of text at index indexNumbertext Text
index Number
CHOOSEReturns first non-empty parameterObjectparameters Object
CONTAINSReturns true if left contains right, otherwise falseBooleanleft Text
right Text
DATASTORE_LOOKUPReturns the value of return column name in the resource table where if column name is if column value. Returns default value if no match is foundTextresource table Text
case Object
if column name Text
if column value Text
return column name Text
default value Text
DATE_FORMAT Formats timestamp as a formatObjecttimestamp Object
format Text
DATE_PARSE Converts date timestamp having format format to unix millisecondsObjecttimestamp Object
format Text
DEFAULTReturns returnObjectreturn Object
DIVIDEReturns the division result of divisor / dividendNumberdividend Number
divisor Number
DOUBLECasts object to a doubleNumberobject Object
EMPTYReturns true if input text is empty, otherwise falseBooleaninput text Text
ENDSReturns true if left ends with right, otherwise falseBooleanleft Text
right Text
EQReturns true if number a is equal to number b, otherwise falseObjectnumber a Number
number b Number
EXACTMATCHReturns true if left case sensitively matches right, otherwise falseBooleanleft Text
right Text
FINDReturns the position of find text inside within text. Return -1 if the text is not foundNumberwithin text Text
find text Text
start index Number
FLOORRounds number downNumbernumber Number
GTReturns true if number a is greater than number b, otherwise falseBooleannumber a Number
number b Number
GTE Returns true if number a is greater or equal to number b, otherwise falseBooleannumber a Number
number b Number
IF_THEN_ELSEReturns true result if condition is true, otherwise false resultObjectcondition Boolean
true result Object
false result Object
INDEXReturns the value at the position postition in the range or array arrayTextarray Object
postition Number
INT Casts object to an integerObject-
IS Returns true if left matches right, otherwise falseBooleanleft Text
right Text
JSON_QUERY Takes a source json and extracts characters and tokens from itObjectobject Object
token Text
LONGCasts object to a longNumberobject Object
LTReturns true if number a is less than number b, otherwise falseBooleannumber a Number
number b Number
LTEReturns true if number a is less than or equal to number b, otherwise falseBooleannumber a Number
number b Number
MATCH Returns true if left matches right, otherwise falseBooleanleft Text
right Text
MAX Returns the largest number in a list of numbersNumbernumber Number
MINReturns the smallest number in a list of numbersNumbernumber Number
MULTIPLY Returns the multiplication of the numbersNumberoperand Number
NEQReturns true if number a is not equal to number b, otherwise falseObjectnumber a Number
number b Number
NORMALIZE_UNIX_TIMEParses timestamp as a unix timestampObjecttimestamp Object
NOTReverses the boolean value of inputBooleaninput Boolean
NOW Returns the current timeObject-
NULLReturns nullObject-
OR Returns true if any of conditions are true, otherwise falseBooleancondition Boolean
POW Returns the value of number ^ exponentNumbernumber Number
exponent Number
REGEX_GROUP Finds the subsequence at index of the input sequence input that matches patternTextinput Text
pattern Text
index Number
REGEX_MATCHReturns true if input matches against pattern, otherwise falseBooleaninput Text
pattern Text
REPLACE Replaces all occurrences of target in input with replacementTextinput Text
target Text
replacement Text
SELECT Returns first non-null parameterObjectparameters Object
SENSITIVE Marks value as sensitive information (PII)Textvalue Object
SENSITIVE_EXT Marks value as sensitive information (PII)Textvalue Object
SPLITSplits text around the character/text delimiter into an arrayArraytext Text
delimiter Text
SQRT Returns the square root of numberNumbernumber Number
STARTSReturns true if left starts with right, otherwise falseBooleanleft Text
right Text
STRINGCasts object to a stringTextobject Object
SUBSTRING Returns a string that is a substring of text. The substring begins with the character at begin index and extends to end index or the end of the stringTexttext Text

begin index Number

end index Number
SUBTRACTReturns the subtraction result number a - number bNumbernumber a Number
number b Number
SWITCH Returns case return value if any case match matches test value, otherwise defaultObjecttest value Text
case Object
case match Text
case return value Text
default Object
SWITCH_REGEXReturns case return value if any case regex match matches test value, otherwise defaultObjecttest value Text
case Object
case regex match Text
case return value Text
default Object
TO_LOWER_CASEConverts text to lowercaseTexttext Text
TO_UNIX_MSConverts date timestamp having format format to unix millisecondsObjecttimestamp Object
format Text
TO_UPPER_CASEConverts text to uppercaseTexttext Text
TRIMReturns text with surrounding whitespace removedObjecttext Text
UNIX_TO_ISO_TIMESTAMPConverts unix timestamp to ISO timestamp formatTexttimestamp Object
URL_TO_HOSTExtracts the host part of urlTexturl Text
WHATAMI Returns the object (user or organization) of the profileObject-
WHOAMIReturns the PID (profile ID) of the profileObject-
============================================================