Function
|
Syntax
|
Purpose
|
| acos | acos(value) | Returns the inverse cosine of value. |
| asin | asin(value) | Returns the inverse sine of a value. |
| atan | atan(value) | Returns the inverse tangent of a value. |
| beta_dist | beta_dist(value, alpha, beta, cumulative) | Returns the position of value on the beta distribution with parameters alpha and beta. If cumulative = yes, returns the cumulative probability. |
| beta_inv | beta_inv(probability, alpha, beta) | Returns the position of probability on the inverse cumulative beta distribution with parameters alpha and beta. |
| binom_dist | binom_dist(num_successes, num_tests, probability, cumulative) | Returns the probability of getting num_successes successes in num_tests tests with the given probability of success. If cumulative = yes, returns the cumulative probability. |
| binom_inv | binom_inv(num_tests, test_probability, target_probability) | Returns the smallest number k such that binom(k, num_tests, test_probability, yes) >= target_probability. |
| chisq_dist | chisq_dist(value, dof, cumulative) | Returns the position of value on the gamma distribution with dof degrees of freedom. If cumulative = yes, returns the cumulative probability. |
| chisq_inv | chisq_inv(probability, dof) | Returns the position of probability on the inverse cumulative gamma distribution with dof degrees of freedom. |
| chisq_test | chisq_test(actual, expected) | Returns the probability for the chi-squared test for independence between actual and expected data. actual can be a column or a column of lists, and expected must be the same type. |
| combin | combin(set_size, selection_size) | Returns the number of ways of choosing selection_size elements from a set of size set_size. |
| confidence_norm | confidence_norm(alpha, stdev, n) | Returns half the width of the normal confidence interval at significance level alpha, standard deviation stdev, and sample size n. |
| confidence_t | confidence_t(alpha, stdev, n) | Returns half the width of the Student’s t-distribution confidence interval at significance level alpha, standard deviation stdev, and sample size n. |
| correl | correl(column_1, column_2) | Returns the correlation coefficient of column_1 and column_2. |
| cos | cos(value) | Returns the cosine of value. |
| count | count(expression) | Returns the count of non-null values in the column defined by expression, unless expression defines a column of lists, in which case returns the count in each list. |
| count_distinct | count_distinct(expression) | Returns the count of distinct non-null values in the column defined by the expression, unless the expression defines a column of lists, in which case it returns the count in each list. |
| covar_pop | covar_pop(column_1, column_2) | Returns the population covariance of column_1 and column_2. |
| covar_samp | covar_samp(column_1, column_2) | Returns the sample covariance of column_1 and column_2. |
| degrees | degrees(value) | Converts value from radians to degrees. |
| expon_dist | expon_dist(value, lambda, cumulative) | Returns the position of value on the exponential distribution with parameter lambda. If cumulative = yes, returns the cumulative probability. |
| f_dist | f_dist(value, dof_1, dof_2, cumulative) | Returns the position of value on the F distribution with parameters dof_1 and dof_2. If cumulative = yes, returns the cumulative probability. |
| f_inv | f_inv(probability, dof_1, dof_2) | Returns the position of probability on the inverse cumulative F distribution with parameters dof_1 and dof_2. |
| fact | fact(value) | Returns the factorial of value. |
| gamma_dist | gamma_dist(value, alpha, beta, cumulative) | Returns the position of value on the gamma distribution with parameters alpha and beta. If cumulative = yes, returns the cumulative probability. |
| gamma_inv | gamma_inv(probability, alpha, beta) | Returns the position of probability on the inverse cumulative gamma distribution with parameters alpha and beta. |
| geomean | geomean(expression) | Returns the geometric mean of the column created by expression unless expression defines a column of lists, in which case returns the geometric mean of each list. |
| hypgeom_dist | hypgeom_dist (sample_successes, sample_size, population_successes, population_size, cumulative) | Returns the probability of getting sample_successes from the given sample_size, number of population_successes, and population_size. If cumulative = yes, returns the cumulative probability. |
| intercept | intercept(y_column, x_column) | Returns the intercept of the linear regression line through the points determined by y_column and x_column.
|
| kurtosis | kurtosis(expression) | Returns the sample excess kurtosis of the column created by expression unless expression defines a column of lists, in which case returns the sample excess kurtosis of each list. |
| large | large(expression, k) | Returns the kth largest value of the column created by expression unless expression defines a column of lists, in which case returns the kth largest value of each list. |
| match | match(value, expression) | Returns the row number of the first occurrence of value in the column created by expression unless expression defines a column of lists, in which case returns the position of value in each list. |
| max | max(expression) | Returns the max of the column created by expression unless expression defines a column of lists, in which case returns the max of each list.
|
| mean | mean(expression) | Returns the mean of the column created by expression unless expression defines a column of lists, in which case returns the mean of each list.
|
| median | median(expression) | Returns the median of the column created by expression unless expression defines a column of lists, in which case returns the median of each list. |
| min | min(expression) | Returns the min of the column created by expression unless expression defines a column of lists, in which case returns the min of each list. |
| mode | mode(expression) | Returns the mode of the column created by expression unless expression defines a column of lists, in which case returns the mode of each list. |
| multinomial | multinomial(value_1, value_2, ...) | Returns the factorial of the sum of the arguments divided by the product of each of their factorials. |
| negbinom_dist | negbinom_dist(num_failures, num_successes, probability, cumulative) | Returns the probability of getting num_failures failures before getting num_successes successes, with the given probability of success. If cumulative = yes, returns the cumulative probability. |
| norm_dist | norm_dist(value, mean, stdev, cumulative) | Returns the position of value on the normal distribution with the given mean and stdev. If cumulative = yes, returns the cumulative probability. |
| norm_inv | norm_inv(probability, mean, stdev) | Returns the position of probability on the inverse normal cumulative distribution. |
| norm_s_dist | norm_s_dist(value, cumulative) | Returns the position of value on the standard normal distribution. If cumulative = yes, returns the cumulative probability. |
| norm_s_inv | norm_s_inv(probability) | Returns the position of probability on the inverse standard normal cumulative distribution. |
| percent_rank | percent_rank(column, value) | Returns the rank of a value in a column as a percentage from 0 to 1 inclusive, where column is the column, field, list, or range containing the dataset to consider; and value is the column with the value for which the percentage rank will be determined.
Sample Usage:
percent_rank(${view_name.field_1}, ${view_name.field_1}) percent_rank(list(1, 2, 3), ${view_name.field_1}) percent_rank(list(1, 2, 3), 2) |
| percentile | percentile(value_column, percentile_value) | Returns the value from the column created by the expression corresponding to the given percentile_value, unless the expression defines a column of lists, in which case it returns the percentile value for each list. percentile_value must be between 0 and 1; otherwise returns null. |
| pi | pi() | Returns the value of pi. |
| poisson_dist | poisson_dist(value, lambda, cumulative) | Returns the position of value on the poisson distribution with parameter lambda. If cumulative = yes, returns the cumulative probability. |
| product | product(expression) | Returns the product of the column created by expression unless expression defines a column of lists, in which case returns the product of each list. |
| radians | radians(value) | Converts value from degrees to radians. |
| rank | rank(value, expression) | Returns the rank of a value in the column created by the expression. For example, if you want to rank orders by their total sale price, you could use rank(${order_items.total_sale_price},${order_items.total_sale_price}), which gives a rank for each value of order_items.total_sale_price in your query when comparing it to the entire column of order_items.total_sale_price in your query. In the case where the expression defines multiple lists, this function returns the relative size of the value in each list. |
| rank_avg | rank_avg(value, expression) | Returns the average rank of a value in the column created by expression unless expression defines a column of lists, in which case returns the average rank of a value in each list. |
| running_product | running_product (value_column) | Returns a running product of the values in value_column. |
| running_total | running_total(value_column) | Returns a running total of the values in value_column. |
| sin | sin(value) | Returns the sine of value. |
| skew | skew(expression) | Returns the sample skewness of the column created by expression unless expression defines a column of lists, in which case returns the sample skewness of each list. |
| slope | slope(y_column, x_column) | Returns the slope of the linear regression line through points determined by y_column and x_column. |
| small | small(expression, k) | Returns the kth smallest value of the column created by expression unless expression defines a column of lists, in which case returns the kth smallest value of each list. |
| stddev_pop | stddev_pop(expression) | Returns the standard deviation (population) of the column created by expression unless expression defines a column of lists, in which case returns the standard deviation (population) of each list. |
| stddev_samp | stddev_samp(expression) | Returns the standard deviation (sample) of the column created by expression unless expression defines a column of lists, in which case returns the standard deviation (sample) of each list. |
| sum | sum(expression) | Returns the sum of the column created by expression unless expression defines a column of lists, in which case returns the sum of each list.
|
| t_dist | t_dist(value, dof, cumulative) | Returns the position of value on the Student’s t-distribution with dof degrees of freedom. If cumulative = yes, returns the cumulative probability. |
| t_inv | t_inv(probability, dof) | Returns the position of probability on the inverse normal cumulative distribution with dof degrees of freedom. |
| t_test | t_test(column_1, column_2, tails, type) | Returns the result of a Student’s t-test on the data from column_1 and column_2, using 1 or 2 tails. type: 1 = paired, 2 = homoscedastic, 3 = heteroscedastic. |
| tan | tan(value) | Returns the tangent of a value. |
| var_pop | var_pop(expression) | Returns the variance (population) of the column created by expression unless expression defines a column of lists, in which case returns the variance (population) of each list. |
| var_samp | var_pop(expression) | Returns the variance (sample) of the column created by expression unless expression defines a column of lists, in which case returns the variance (sample) of each list. |
| weibull_dist | weibull_dist(value, shape, scale, cumulative) | Returns the position of value on the Weibull distribution with parameters shape and scale. If cumulative = yes, returns the cumulative probability. |
| z_test | z_test(data, value, stdev) | Returns the one-tailed p-value of the z-test using the existing data and stdev on the hypothesized mean value. |