Skip to main content

Analytic functions listing

Overview

A function is a named calculation that uses input fields as arguments and returns a result. The result can be used in a custom formula, calculated member or other resource, or it can become an input to another function. Data Hub ships with a suite of ready-to-use system functions to assist with complex calculations.

Functions range from formulas for relative time, statistical functions and OLAP operations, and add powerful functionality to even the most basic cubes.

Functions use fields as input, and return a value, set, or member. Functions can be located in the Resource Explorer or from the right click menu on the columns and rows placeholders in an analyses, or from the functions place holder in a calculated member function.

A reduced functions list is shown when right clicking on a member placeholder in a report axis first, and then using the right click context menu. This filters the list to show functions only relevant to the selected member.

Logical

FunctionSub categoryDescription
Contains Member FunctionReturns True if the provided member can be found in the set.
Is Current MemberReturns True if the current member in context matches the Member field.
Is EmptyReturns true for formulas that evaluate to empty (null) data. However, this is not equivalent to comparing the value with null, because nulls are implicitly converted to zeros.
Is Member OfReturns True if the currently logged-on user is a member of the specified Active Directory or local group.
Is UserReturns True if the currently logged-on user matches the user name field.

Member

FunctionSub categoryDescription
AncestorReturns the ancestor of a member at a specified level.
Current MemberReturns the current member from a hierarchy.
FirstReturns the first member of set.
Lag/AdvanceReturns the member that is the specified number of positions prior to the specified member.
LastReturns the last member of set.
Link MemberReturns a member parallel to the reference member- in the specified hierarchy. For example- returns the January Ship Date member for the the January Order Date member.
Parallel MemberReturns a member from another period in the same relative position as the specified member.
ParentReturns the parent of the specified member.

Parameterization

FunctionSub categoryDescription
CheckboxA parameterized checkbox entry that prompts the user when the resource is opened.
Number InputA parameterized numeric entry that prompts the user with a text box when the resource is opened.

Set

FunctionSub categoryDescription
DescendantsSetReturns the descendants of the specified member.
DistinctSetReturns only the distinct members of a set.
EmptySetReturns a set composed of the empty members from the specified set.
ExceptSetReturns the difference between two specified sets.
FilterSetReturns the set resulting from filtering a set based on a condition.
HeadSetReturn a number of items from the start of a list.
ItemSetReturns a specific item from a list.
Level by IndexSetReturns a level specified by index from a specified hierarchy. The All level is 0. The Level Number function can be a useful complement to this function.
Non-EmptySetReturns a set of members from a set- which exist in a second set- where the members have non-null values. For example- returns the set of Products that have sales in New York.
OrderSetSorts the members of a specified set- optionally breaking the hierarchy.
ReverseSetReverses the order of members in a set.
Static SetSetBy default- sets are evaluated for each pivot table cell. Specifying a set as static evaluates it once- stores the result- and subsequently reuses the stored set. This may improve performance.
Sub SetSetReturns a sub-range of members from a set.
TailSetReturn a number of items from the end of a list.
Cross-Hierarchy UnionSet/AdvancedOccasionally it is necessary to union two sets from different hierarchies. This is best demonstrated with two time hierarchies; e.g. Created On and Re-opened On. A cross-hierarchy union of a set from each of these dimensions would result in all Created On or Re-opened On dates.
ExistsSet/AdvancedReturns items from a set, for which data exists in specified measure group.
For EachSet/AdvancedFor each member of the first set- an instance of the second set is generated. For example- for each of the top 5 sales regions- return the top 5 sales persons.
Include Cube Calculated MembersSet/AdvancedAdds cube calculated members into the current set. These are not included by default.
IntersectSet/AdvancedReturns the intersection of two sets. For example- the intersection of January to July and June to December is June- July.
Names to SetSet/AdvancedReturns the members from a given hierarchy that match on a comma separated list of names specified as text.
Conditional SetSet/Dynamic SetsReturns one of two specified sets- depending on whether the specified condition is True or False.
ContainsSet/Dynamic SetsReturns a set of members- from the specified set- that contain the specified text.
RangeSet/Dynamic SetsReturns a set of members between the specified ToMember and FromMember values - optionally including the members themselves.
Starts WithSet/Dynamic SetsReturns a set of members- from the specified set- that begin with the specified text.
Bottom CountSet/Top and BottomReturns a specified number of items from the bottom of a set.
Bottom PercentSet/Top and BottomReturns a set with the lowest values- whose cumulative total is equal to or greater than a specified percentage.
Bottom SumSet/Top and BottomReturns a set with the lowest values whose sum is equal to or greater than a specified value.
Pareto (80-20)Set/Top and BottomReturns a set with the items composing the top 80 percent and the sum of the items composing the bottom 20 percent.
Top CountSet/Top and BottomReturns a specified number of items from the top of a set.
Top PercentSet/Top and BottomReturns a set with the highest values- whose cumulative total is equal to or greater than a specified percentage.
Top SumSet/Top and BottomReturns a set with the highest values- whose sum is equal to or greater than a specified value.

Text

FunctionSub categoryDescription
Current MembersReturns the names of current members for the specified hierarchies; or- if no hierarchy is specified- the names of the current members for all non-default hierarchies.
HTMLReturns specified HTML code.
JoinReturns the members of a set, with the individual members are separated by semicolons.
Member NameReturns the name of a specified member. This function caters to conditional text.
TextEnables the entry of text into a formula.

Value

FunctionSub categoryDescription
AccumulateValueReturns a running total for the specified formula for the set on the opposite axis.
AggregateValueAggregate using the default operation defined for the hierarchy
AverageValueReturns the arithmetic mean of the specified set.
CountValueReturns the count of the number of members in the specified set.
Count ExistingValueReturns the count of items that have non-empty entries (exist) for the second set. For example- where Count returns the number of days in a month- CountExisting could return the number of days on which a sale occurred.
DeltaValueReturns the difference between adjacent values of the specified formula for the set on the opposite axis.
Distinct CountValueReturns the distinct count of the number of members in the specified set.
Level NumberValueReturns the level number for the specified member. The All level is 0.
Percent of ParentValueReturns the percentage of parent that the current member of a hierarchy forms- calculated for a specified formula. Optionally, restricts the calculation to only those parents on the opposite axis.
RankValueReturns the rank of the specified formula for each item in the set on the opposite axis. NB ranking is expensive. It is therefore recommended that a Top or Bottom function be applied to the opposite axis to avoid ranking directly on large (thousands) sets.
Rank SetValueReturns the rank of the specified formula for each item in the specified set. NB ranking is expensive. It is therefore recommended that a Top or Bottom function first be applied to the rank set to avoid ranking directly on large (thousands) sets.
SumValueReturns the sum of the specified set.
Absolute ValueValue/MathReturns the value of a number without its sign.
ExponentValue/MathReturns e raised to the specified power.
LnValue/MathReturns the natural logarithm (base e) of a number.
Log10Value/MathReturns the base 10 logarithm of a specified number.
PowerValue/MathReturns a specified number raised to the specified power.
AcosValue/Math/GeospatialReturns the angle whose cosine is the specified number.
AsinValue/Math/GeospatialReturns the angle whose sine is the specified number.
AtanValue/Math/GeospatialReturns the angle whose tangent is the specified number.
Atan2Value/Math/GeospatialReturns the angle whose tangent is the quotient of two specified numbers.
CosValue/Math/GeospatialReturns the cosine of the specified angle.
DegreesToRadiansValue/Math/GeospatialConverts the specified angle in degrees to radians.
RadiansToDegreesValue/Math/GeospatialConverts the specified angle in radians to degrees.
SinValue/Math/GeospatialReturns the sine of the specified angle.
TanValue/Math/GeospatialReturns the tangent of the specified angle.
CeilingValue/RoundingReturns the smallest integer value that is greater than or equal to the specified double-precision floating-point number.
FloorValue/RoundingReturns the largest integer less than or equal to the specified double-precision floating-point number.
RoundValue/RoundingRounds a double-precision floating-point value to a specified number of decimal digits.
TruncateValue/RoundingCalculates the integer part of a specified double-precision floating-point number.
Linear RegressionValue/StatisticsReturns the regression value, allowing you to show trend lines in charts.
Geometric MeanValue/Statistics/DescriptiveReturns the geometric mean for the specified set.
MaximumValue/Statistics/DescriptiveReturns the highest value from the specified set.
MedianValue/Statistics/DescriptiveReturns the median value (the middle value) in the specified set of ordered numbers.
MinimumValue/Statistics/DescriptiveReturns the smallest value in a specified set.
Standard DeviationValue/Statistics/DescriptiveReturns the standard deviation of a numeric expression evaluated over a set.
Value RangeValue/Statistics/DescriptiveValue Range is the length of the smallest interval which contains all the data. It is calculated by subtracting the smallest observation (sample minimum) from the greatest (sample maximum) and provides an indication of statistical dispersion.
VarianceValue/Statistics/DescriptiveReturns the variance of a specified numeric expression- evaluated over a specified set.

Time

FunctionSub categoryDescription
Closing BalanceTimeReturns the sum of the specified formula for all members up to the end of the specified time member.
Date DifferenceTimeReturns the number of days, weeks or months between two dates.
Day of WeekTimeReturns the specified member's day of the week (Sunday through Saturday).
Days in PeriodTimeReturns the number days in the current time member.
Last Complete PeriodTimeReturns the last complete period for the provided time periods set.
Last Complete PeriodsTimeReturns the last complete periods of data for the provided time period's set.
Most Recent PeriodTimeReturns the most recent data member for the provided time periods set.
Most Recent PeriodsTimeReturns the most recent periods of data for the provided time period's set.
NextTimeReturns the next member in the level that contains the specified member.
Opening BalanceTimeReturns the sum of the specified formula for all members up to the end of the member preceding the specified time member.
Period on Period GrowthTimeReturns the growth from the previous period to the current in context.
Period to Date MembersTimeReturns the members to date for the specified period and level.
Periods BetweenTimeReturns a set of all dates between the specified members including the members themselves.
Periods FromTimeReturns all members from and including the specified period.
Periods ToTimeReturns all members up to and including the specified period.
PreviousTimeReturns the previous member in the level that contains the specified member.
Previous WeekdayTimeReturns the previous weekday for the specified date member.
Rolling SumTimeReturns a rolling sum for the specified formula.
Context PeriodTime/Current PeriodReturns the period in context- either provided by the opposite axis or the filter context.
Current DateTime/Current PeriodReturns the current date. The date hierarchy is defaulted if only a single one exists.
Current MonthTime/Current PeriodReturns the current month from the provided hierarchy.
Current QuarterTime/Current PeriodReturns the current quarter from the provided hierarchy.
Current WeekTime/Current PeriodReturns the current week from the provided hierarchy.
Current YearTime/Current PeriodReturns the current year from the provided hierarchy.
Dates to CurrentTime/Current PeriodReturns all members up to and including the current date.
Months to CurrentTime/Current PeriodReturns all members up to and including the current month.
Quarters to CurrentTime/Current PeriodReturns all members up to and including the current quarter.
Weeks to CurrentTime/Current PeriodReturns all members up to and including the current week.
Years to CurrentTime/Current PeriodReturns all members up to and including the current year.
Last Complete MonthTime/Current Period/Last CompleteReturns the last complete month from the provided hierarchy.
Last Complete QuarterTime/Current Period/Last CompleteReturns the last complete quarter from the provided hierarchy.
Last Complete WeekTime/Current Period/Last CompleteReturns the last complete week from the provided hierarchy.
Last Complete YearTime/Current Period/Last CompleteReturns the last complete year from the provided hierarchy.
Most Recent DateTime/Current Period/Most Recent DateReturns the most recent date for which data exists, optionally evaluated over a second set.
Most Recent MonthTime/Current Period/Most Recent DateReturns the most recent month for which data exists, optionally evaluated over a second set.
Most Recent QuarterTime/Current Period/Most Recent DateReturns the most recent quarter for which data exists, optionally evaluated over a second set.
Most Recent WeekTime/Current Period/Most Recent DateReturns the most recent week for which data exists, optionally evaluated over a second set.
Most Recent YearTime/Current Period/Most Recent DateReturns the most recent year for which data exists, optionally evaluated over a second set.
Full Month (FM)Time/Full PeriodReturns a member representing the full month.
Full Quarter (FQ)Time/Full PeriodReturns a member representing the full quarter.
Full Week (FW)Time/Full PeriodReturns a member representing the full week.
Full Year (FY)Time/Full PeriodReturns a member representing the full year.
Exponential Moving AverageTime/Moving AveragesReturns an exponential moving average for the specified formula.
Simple Moving AverageTime/Moving AveragesReturns a simple moving average for the specified formula.
Weighted Moving AverageTime/Moving AveragesReturns a weighted moving average for the specified formula.
Month to Date Total (MTD)/Time/Period to Date TotalsReturns the month to date total for the current time member.
Periods To Date Total (PTD)/Time/Period to Date TotalsReturns the period to date total for a specified level.
Prior Month to Date Total/Time/Period to Date TotalsReturns the month to date total for a member from the prior month.
Prior Quarter to Date Total/Time/Period to Date TotalsReturns the quarter to date total for a member from the prior quarter.
Prior Week to Date Total/Time/Period to Date TotalsReturns the week to date total for a member from the prior week.
Prior Year to Date Total/Time/Period to Date TotalsReturns the year to date total for a member from the prior year.
Quarter to Date Total (QTD)/Time/Period to Date TotalsReturns the quarter to date total for the current time member.
Total to Date (TTD)/Time/Period to Date TotalsReturns the total-to-date amount for the current time member.
Week to Date Total (WTD)/Time/Period to Date TotalsReturns the week-to-date total for the current time member.
Year to Date Total (YTD)/Time/Period to Date TotalsReturns the year-to-date total for the current time member.
Last Year, Month to Date Total (LY MTD)/Time/Period to Date Totals/Last YearReturns the month-to-date total for the previous year's current time member.
Last Year, Quarter to Date Total (LY QTD)/Time/Period to Date Totals/Last YearReturns the quarter-to-date total for the previous year's current time member.
Last Year, Week to Date Total (LY WTD)/Time/Period to Date Totals/Last YearReturns the week-to-date total for the previous year's current time member.
Last Year, Year to Date Total (LY YTD)/Time/Period to Date Totals/Last YearReturns the year-to-date total for the previous year's current time member.
Parallel Period/Time/Prior PeriodReturns a member from another period in the same relative position as the specified member.
Period in Prior Month/Time/Prior PeriodReturns a member from the prior month- in the same relative position as the current time member.
Period in Prior Quarter/Time/Prior PeriodReturns a member from the prior quarter- in the same relative position as the current time member.
Period in Prior Week/Time/Prior PeriodReturns a member from the prior week- in the same relative position as the current time member.
Period in Prior Year/Time/Prior PeriodReturns a member from the prior year- in the same relative position as the current time member.

Visualization

FunctionSub categoryDescription
SparklineCreates small trend line charts (sparklines) within analyses based on a numeric formula and a specified time period.
StatusGenerates KPI status icons depending on the specified boundaries.

Custom formula and custom set

FunctionSub categoryDescription
Custom formulaCreate a custom formula
Custom SetReturns True if the provided member can be found in the set.

Reference member and reference set

FunctionSub categoryDescription
Reference memberReference another formula or member function.
Reference setReference another set of members or a template set.

How to Use analytic functions