Level of detail 20
- Distinct customers per regionCounts each customer once per region.
- Exclude all view dimensionsRemoving every view dimension produces a global total.
- Exclude responds to dimension filterDimension filters change the input to EXCLUDE calculations.
- First invoice dateReturns the earliest invoice date per customer.
- Fixed customer lifetime revenueAdds invoices at customer grain.
- Fixed grand totalRepeats the total across regional marks.
- Fixed region totalRepeats a region total across its teams.
- Fixed total with context filterA context filter changes the fixed calculation population.
- Fixed total with ordinary filterAn ordinary dimension filter does not change the fixed total.
- Invoice count per customerCounts non-null invoice amounts at customer grain.
- Largest customer revenueAggregates customer totals once within each region.
- Mean customer revenueAggregates customer totals once within each region.
- Mean team revenueAverages team totals within each region.
- Median customer revenueAggregates customer totals once within each region.
- Nested largest customer per regionFinds the largest customer total inside each region.
- Nested smallest customer per regionFinds the smallest customer total inside each region.
- Region share of fixed totalDivides regional revenue by the fixed global total.
- Region total excluding teamRemoves team from the view calculation grain.
- Smallest customer revenueAggregates customer totals once within each region.
- Team share within regionDivides team revenue by its region total.
Table calculations 50
- Centered three-period averageAverages the previous, current, and next regional marks with clipped edges.
- Dense rank within regionAssigns dense descending revenue ranks separately within each region.
- Difference from first periodSubtracts the revenue of the first addressed period in each region.
- Difference from last periodSubtracts the revenue of the last addressed period in each region.
- Difference from previous periodSubtracts the previous regional period revenue.
- FIRSTReturns the relative offset to the first mark in the partition.
- INDEXReturns the one-based mark position within each regional partition.
- LASTReturns the relative offset to the last mark in the partition.
- LOOKUPReturns the previous addressed mark revenue, or null outside the partition.
- Next period revenueReturns the next addressed regional period revenue.
- Percent change from previous periodMeasures revenue change relative to the absolute previous period revenue.
- Percent of regional totalDivides each period revenue by its regional total.
- PREVIOUS_VALUERepeats the initial revenue when the calculated field consists only of PREVIOUS_VALUE.
- RANKRanks regional mark revenues with the documented tie rule and excludes null measures.
- RANK_DENSERanks regional mark revenues with the documented tie rule and excludes null measures.
- RANK_MODIFIEDRanks regional mark revenues with the documented tie rule and excludes null measures.
- RANK_PERCENTILERanks regional mark revenues with the documented tie rule and excludes null measures.
- RANK_UNIQUERanks regional mark revenues with the documented tie rule and excludes null measures.
- Regional mark position fractionDivides the one-based addressed position by the regional mark count.
- Regional min-max normalizationScales revenue between the regional minimum and maximum.
- Regional revenue z-scoreStandardizes revenue using the regional mean and sample standard deviation.
- Regional running totalAccumulates period revenue independently for each region.
- Running percent of totalMeasures cumulative revenue as a share of the full regional total.
- Running revenue productMultiplies each revenue into the prior calculated product; a null propagates.
- RUNNING_AVGCalculates avg over the current and preceding regional marks, excluding null revenues.
- RUNNING_COUNTCalculates count over the current and preceding regional marks, excluding null revenues.
- RUNNING_MAXCalculates max over the current and preceding regional marks, excluding null revenues.
- RUNNING_MINCalculates min over the current and preceding regional marks, excluding null revenues.
- RUNNING_STDEVCalculates stdev over the current and preceding regional marks, excluding null revenues.
- RUNNING_STDEVPCalculates stdevp over the current and preceding regional marks, excluding null revenues.
- RUNNING_SUMCalculates sum over the current and preceding regional marks, excluding null revenues.
- RUNNING_VARCalculates var over the current and preceding regional marks, excluding null revenues.
- RUNNING_VARPCalculates varp over the current and preceding regional marks, excluding null revenues.
- SIZEReturns the number of marks in each regional partition, including null measures.
- TOTALReturns the total revenue across the regional partition.
- Two-period moving averageAverages non-null revenues from the current and preceding regional mark.
- WINDOW_AVGCalculates avg over all regional marks, excluding null revenues.
- WINDOW_CORRCalculates the regional paired revenue and cost statistic using non-null pairs.
- WINDOW_COUNTCalculates count over all regional marks, excluding null revenues.
- WINDOW_COVARCalculates the regional paired revenue and cost statistic using non-null pairs.
- WINDOW_COVARPCalculates the regional paired revenue and cost statistic using non-null pairs.
- WINDOW_MAXCalculates max over all regional marks, excluding null revenues.
- WINDOW_MEDIANCalculates median over all regional marks, excluding null revenues.
- WINDOW_MINCalculates min over all regional marks, excluding null revenues.
- WINDOW_PERCENTILEReturns the interpolated 25th percentile of non-null regional mark revenues.
- WINDOW_STDEVCalculates stdev over all regional marks, excluding null revenues.
- WINDOW_STDEVPCalculates stdevp over all regional marks, excluding null revenues.
- WINDOW_SUMCalculates sum over all regional marks, excluding null revenues.
- WINDOW_VARCalculates var over all regional marks, excluding null revenues.
- WINDOW_VARPCalculates varp over all regional marks, excluding null revenues.
Aggregates 16
- ATTRReturns the sole distinct non-null value, or a multiple-value marker.
- AVGReturns the arithmetic mean of non-null values.
- CORRReturns the Pearson correlation of complete numeric pairs.
- COUNTCounts non-null values.
- COUNTDCounts distinct non-null values.
- COVARReturns the sample covariance of complete numeric pairs.
- COVARPReturns the population covariance of complete numeric pairs.
- MAXReturns the greatest non-null value.
- MEDIANReturns the median of non-null values.
- MINReturns the least non-null value.
- PERCENTILEReturns a linearly interpolated percentile of non-null values.
- STDEVReturns the sample standard deviation of non-null values.
- STDEVPReturns the population standard deviation of non-null values.
- SUMReturns the sum of non-null values.
- VARReturns the sample variance of non-null values.
- VARPReturns the population variance of non-null values.
Dates 23
- DATEConverts a value to a date.
- DATEADDAdds an interval to a date.
- DATEDIFFCounts date-part boundaries between dates.
- DATENAMEReturns a date-part name as text.
- DATEPARSEParses a date string using a supplied format.
- DATEPARTReturns a numeric date part.
- DATETIMEConverts a value to a datetime.
- DATETRUNCTruncates a date to a date-part boundary.
- DAYReturns the day of month.
- ISDATETests whether a string can be interpreted as a date.
- ISOQUARTERReturns the quarter within the ISO week year.
- ISOWEEKReturns the ISO week number.
- ISOWEEKDAYReturns Monday-based ISO weekday numbers.
- ISOYEARReturns the ISO week year.
- MAKEDATEConstructs a date from year, month, and day.
- MAKEDATETIMECombines a date with the time component of a datetime.
- MAKETIMEConstructs a datetime from clock components.
- MONTHReturns the month number.
- NOWReturns the configured current datetime.
- QUARTERReturns the calendar quarter number.
- TODAYReturns the configured current date.
- WEEKReturns the week number under the configured week start.
- YEARReturns the calendar year.
Logic 4
Numbers 30
- ABSReturns the absolute value of a number.
- ACOSReturns the inverse cosine in radians.
- ASINReturns the inverse sine in radians.
- ATANReturns the inverse tangent in radians.
- ATAN2Returns the angle in radians from two coordinates.
- CEILINGRounds upward to the nearest integer.
- COSReturns the cosine of an angle in radians.
- COTReturns the cotangent of an angle in radians.
- DEGREESConverts radians to degrees.
- DIVReturns the integer quotient, truncated toward zero.
- EXPReturns e raised to the specified power.
- FLOORRounds downward to the nearest integer.
- GREATESTReturns the greatest non-null argument.
- GREATESTPROPAGATENULLReturns the greatest argument, or null if any argument is null.
- HEXBINXReturns the horizontal coordinate of the nearest hexagonal bin center.
- HEXBINYReturns the vertical coordinate of the nearest hexagonal bin center.
- LEASTReturns the least non-null argument.
- LEASTPROPAGATENULLReturns the least argument, or null if any argument is null.
- LNReturns the natural logarithm for a positive number.
- LOGReturns a logarithm in the specified base.
- PIReturns the ratio of a circle circumference to its diameter.
- POWERRaises a number to a power.
- RADIANSConverts degrees to radians.
- ROUNDRounds a number to the specified decimal precision.
- SIGNReturns minus one, zero, or one for the sign of a number.
- SINReturns the sine of an angle in radians.
- SQRTReturns the nonnegative square root.
- SQUAREReturns a number multiplied by itself.
- TANReturns the tangent of an angle in radians.
- ZNReplaces a null numeric value with zero.
Strings 24
- ASCIIReturns the code point of the first character.
- CHARReturns the character for a Unicode code point.
- CONTAINSTests whether a string contains a substring.
- ENDSWITHTests a suffix after trailing spaces are removed in this example.
- FINDReturns a one-based substring position, or zero when absent.
- FINDNTHReturns the position of a requested substring occurrence.
- LEFTReturns the first requested characters.
- LENCounts characters including spaces.
- LOWERConverts text to lower case.
- LTRIMRemoves spaces at the specified string edges.
- MIDReturns a substring starting at a one-based position.
- PROPERCapitalizes the first character of each word.
- REGEXP_EXTRACTReturns the first captured substring, or null when there is no match.
- REGEXP_EXTRACT_NTHReturns the requested regular-expression capture group.
- REGEXP_MATCHTests whether a regular expression matches anywhere in a string.
- REGEXP_REPLACEReplaces all matches of a regular expression.
- REPLACEReplaces every literal occurrence of a substring.
- RIGHTReturns the last requested characters.
- RTRIMRemoves spaces at the specified string edges.
- SPACEReturns the requested number of spaces.
- SPLITReturns a numbered delimiter-separated token; negative numbers count from the end.
- STARTSWITHTests a prefix after leading spaces are removed in this example.
- TRIMRemoves spaces at the specified string edges.
- UPPERConverts text to upper case.
Type conversion 3
User functions 6
- FULLNAMEReturns the configured full user name.
- ISFULLNAMETests the configured full user name against a literal.
- ISMEMBEROFTests group membership for the configured user.
- ISUSERNAMETests the configured user name against a literal.
- USERDOMAINReturns the domain component of the configured user name.
- USERNAMEReturns the configured user name.
Pass-through SQL 12
- RAWSQL_BOOLEvaluates a permitted scalar SQL expression with positional substitutions.
- RAWSQL_DATEEvaluates a permitted scalar SQL expression with positional substitutions.
- RAWSQL_DATETIMEEvaluates a permitted scalar SQL expression with positional substitutions.
- RAWSQL_INTEvaluates a permitted scalar SQL expression with positional substitutions.
- RAWSQL_REALEvaluates a permitted scalar SQL expression with positional substitutions.
- RAWSQL_STREvaluates a permitted scalar SQL expression with positional substitutions.
- RAWSQLAGG_BOOLEvaluates a permitted aggregate SQL expression with positional substitutions.
- RAWSQLAGG_DATEEvaluates a permitted aggregate SQL expression with positional substitutions.
- RAWSQLAGG_DATETIMEEvaluates a permitted aggregate SQL expression with positional substitutions.
- RAWSQLAGG_INTEvaluates a permitted aggregate SQL expression with positional substitutions.
- RAWSQLAGG_REALEvaluates a permitted aggregate SQL expression with positional substitutions.
- RAWSQLAGG_STREvaluates a permitted aggregate SQL expression with positional substitutions.