Salesforce

What are the available Functions for Insights Table Calculations?

« Go Back
Information
What are the available Functions for Insights Table Calculations?
What-are-the-available-Functions-for-Insights-Table-Calculations
Details

The available functions for table calculations in Looker provide a powerful set of tools for creating various metrics within an Insights Explore data table. These functions allow Insights Analysts to perform a wide range of statistical and mathematical operations on their program's data, from basic calculations to more advanced functions like hypothesis testing and probability distributions.

To better understand the Insights Table Calculation functions, please refer to the information provided below.

 

Available Functions for Table Calculations

Function

Syntax

Purpose

acosacos(value)Returns the inverse cosine of value.
asinasin(value)Returns the inverse sine of a value.
atanatan(value)Returns the inverse tangent of a value.
beta_distbeta_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_invbeta_inv(probability,
alpha, beta)
Returns the position of probability on the inverse cumulative beta distribution with parameters alpha and beta.
binom_distbinom_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_invbinom_inv(num_tests,
test_probability,
target_probability)
Returns the smallest number k such that binom(k, num_tests,
test_probability, yes)
>= target_probability.
chisq_distchisq_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_invchisq_inv(probability, dof)Returns the position of probability on the inverse cumulative gamma distribution with dof degrees of freedom.
chisq_testchisq_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.
combincombin(set_size,
selection_size)
Returns the number of ways of choosing selection_size elements from a set of size set_size.
confidence_normconfidence_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_tconfidence_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.
correlcorrel(column_1, column_2)Returns the correlation coefficient of column_1 and column_2.
coscos(value)Returns the cosine of value.
countcount(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_distinctcount_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_popcovar_pop(column_1,
column_2)
Returns the population covariance of column_1 and column_2.
covar_sampcovar_samp(column_1,
column_2)
Returns the sample covariance of column_1 and column_2.
degreesdegrees(value)Converts value from radians to degrees.
expon_distexpon_dist(value, lambda,
cumulative)
Returns the position of value on the exponential distribution with parameter lambda. If cumulative = yes, returns the cumulative probability.
f_distf_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_invf_inv(probability, dof_1,
dof_2)
Returns the position of probability on the inverse cumulative F distribution with parameters dof_1 and dof_2.
factfact(value)Returns the factorial of value.
gamma_distgamma_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_invgamma_inv(probability,
alpha, beta)
Returns the position of probability on the inverse cumulative gamma distribution with parameters alpha and beta.
geomeangeomean(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_disthypgeom_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.
interceptintercept(y_column,
x_column)
Returns the intercept of the linear regression line through the points determined by y_column and x_column.

kurtosiskurtosis(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.
largelarge(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.
matchmatch(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.
maxmax(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.

meanmean(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.

medianmedian(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.
minmin(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.
modemode(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.
multinomialmultinomial(value_1,
value_2, ...)
Returns the factorial of the sum of the arguments divided by the product of each of their factorials.
negbinom_distnegbinom_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_distnorm_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_invnorm_inv(probability, mean,
stdev)
Returns the position of probability on the inverse normal cumulative distribution.
norm_s_distnorm_s_dist(value,
cumulative)
Returns the position of value on the standard normal distribution. If cumulative = yes, returns the cumulative probability.
norm_s_invnorm_s_inv(probability)Returns the position of probability on the inverse standard normal cumulative distribution.
percent_rankpercent_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)
percentilepercentile(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.
pipi()Returns the value of pi.
poisson_distpoisson_dist(value, lambda,
cumulative)
Returns the position of value on the poisson distribution with parameter lambda. If cumulative = yes, returns the cumulative probability.
productproduct(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.
radiansradians(value)Converts value from degrees to radians.
rankrank(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_avgrank_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_productrunning_product
(value_column)
Returns a running product of the values in value_column.
running_totalrunning_total(value_column)Returns a running total of the values in value_column.
sinsin(value)Returns the sine of value.
skewskew(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.
slopeslope(y_column, x_column)Returns the slope of the linear regression line through points determined by y_column and x_column.
smallsmall(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_popstddev_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_sampstddev_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.
sumsum(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_distt_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_invt_inv(probability, dof)Returns the position of probability on the inverse normal cumulative distribution with dof degrees of freedom.
t_testt_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.
tantan(value)Returns the tangent of a value.
var_popvar_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_sampvar_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_distweibull_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_testz_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.

 

What do you need help with?

Not what you're looking for? Navigate to Understanding Insights Table Calculations


Powered by