Download ANALYTICS MANUAL

Transcript
246
Custom Reports
Expression field or, if the variable is an item listed in the Available Columns/Functions field,
you can drag the item into the function’s expression. Refer to Table 66 for descriptions of the
functions you can use in reports.
Table 66: Functions Description
Function
Description
Aggregate Functions
Select from the following to use an aggregate function in the
expression.
Note: Aggregate functions can be used only when defining output.
avg(expr)
This function computes an average value for the data set expr.
count(expr)
This function returns the number of rows included in the data set
expr.
max(expr)
This function returns the largest numerical value, the last string in
alphabetical order, or the latest date in the data set expr.
min(expr)
This function returns the smallest numerical value, the first string
in alphabetical order, or the earliest date in the data set expr.
sum(expr)
This function returns the sum of the values in the data set expr.
sum_distinct(expr,
reference)
This function returns the sum of distinct values in an expression
for a particular record (reference) rather than for all records of the
same type in a table. For example, if you want to calculate the sum
of all quotas for a particular sales person, you could add a function
of sum_distinct(sa_period2accts.quota,
sa_period2accts.acct_id).
stddev(expr)
This function returns the standard deviation of expr. For example,
the expression stddev(answers.solved_count) returns the
standard deviation of all the values in the solved_count column of the
answers table.
String Functions
concat(str1, str2)
Select from the following to use a string function in the expression:
This function combines input character strings from multiple
expressions into a single output string. Two or more expressions
can be appended with this function. For example, the expression
concat('www.','global','.com') returns the value
www.global.com.
Chapter 5