Supported functions and expressions
Choose the expression surface
A function's name is only part of its contract. Where you write it determines which inputs, functions and calculation rules are available.
| Where you work | What you can use | What the value means |
|---|---|---|
| Calculated measure | 47 deterministic mathematical functions and six scalar helpers listed below; measure("name") references | A reusable model calculation, with its configured aggregation mode. |
| User-defined attribute | 66 catalogue entries: text, NULL, type/date/conditional constructs and deterministic mathematics | One result per source row of one table. An attribute can back a dimension. |
| Agent Chat or Excel Ask | 76 registered function names, including mathematics, text, date grouping, statistics and windows | A structured governed query; the assistant narrates returned values. |
| Native Excel calculated field over XMLA | Mathematical calls, native aliases and the limited scalar/context forms below | A calculation over the cell's completed model values, including its own total. |
| JDBC / SQL query | Governed PostgreSQL expressions accepted for the model and available on the source or through exact translation | A query over the permitted model surface. The editor catalogues are not a complete inventory of every source's SQL functions. |
| Excel add-in worksheet | The eight TESSALLITE.* functions listed below | Governed data retrieval or runtime diagnostics, not a second mathematical engine. |
Use the function picker for the surface you are editing. A source function's existence does not automatically make it available in saved model expressions, Agent requests or native Excel formulas. SQL, MDX and worksheet formulas can give the same name different meanings.
Function support by channel
There are two ways to use a calculation. You can select a published model field, or write an expression in the client. A supported model calculation does not need an equivalent function in every client language: the client can request the field that the modeller has already defined.
A user-defined attribute can back a dimension or measure. Once that field is deployed, JDBC, native Excel/XMLA and Agent requests can use it within the signed-in user's permitted model surface. Its row-level calculation remains defined in the model. Typing the same formula directly in SQL, MDX, DAX or an Agent request is a separate capability with the restrictions below.
Non-mathematical functions
The table compares direct expression support. Follow the family links for complete names, arguments, examples and restrictions.
| Family | Saved model expressions | Agent Chat / Excel Ask | Native Excel / XMLA expressions |
|---|---|---|---|
| Text | Attributes support the complete text list below, including length, left, right, replace, split_part, padding and trimming. General calculated measures do not expose that text family. | lower, upper, trim, concat, substring. The other attribute text functions are not exposed as Agent function calls. | Left, Right, InStr are supported in member-name label filters. This is not a general text-function library for calculated fields. |
| Date and time | Attributes support EXTRACT / date_part, but not date_trunc. Configured time-variant measures provide reusable calendar comparisons. KPI date expressions have their own catalogue. | date_trunc, extract, date_part. | CDate is limited to supported Timeline bounds. Supported DAX time-comparison forms use existing model variants; they do not provide arbitrary date arithmetic. |
| Conditions and NULL | CASE, coalesce, nullif work in measures and attributes. greatest / least are measure-only. Attributes accept AND / OR / NOT; calculated measures accept NOT, but not compound AND / OR. | Structured conditionals; coalesce, nullif; predicates with AND, OR, NOT. No greatest / least calls. | Scalar IIF, IsEmpty conditions and CoalesceEmpty. A scalar condition is one comparison or IsEmpty, without general AND / OR / NOT composition. Arbitrary scalar DAX IF formulas are outside the supported subset. |
| Type conversion | Attributes accept CAST; general calculated measures do not. | No general CAST function. | The supported CDate Timeline form does not imply a general conversion-function library. |
| Aggregates | Define a measure's aggregation in the model. Attributes cannot contain aggregate or window functions. | sum, avg, min, max, count, count_distinct, plus ratio_to_total. | Published measures, supported MDX set/context calculations and the documented DAX aggregate forms. These are not interchangeable with arbitrary SQL aggregate expressions. |
| Statistics and windows | Configured model variants are separate reusable calculations; they do not add arbitrary SQL windows to saved expressions. | stddev, variance, percentile, median; row_number, rank, dense_rank, ntile, running_sum, moving_avg. | Only the documented ranking, cumulative, share and difference forms. Member .Lag / .Lead navigation is different from SQL lag / lead windows. |
JDBC / SQL. Write PostgreSQL expressions against the permitted model fields through the Tessallite JDBC connection. SQL can support functions beyond the finite saved-model and Agent catalogues, but each query must be accepted by the governed parser and binding rules and executable on the selected source through supported translation. The tables do not certify every PostgreSQL function on every source or query shape. A function accepted in JDBC is not automatically accepted as an MDX/DAX formula or as an Agent function call.
On Snowflake, literal SIMILAR TO patterns support SQL wildcards, groups and character classes. Use % for any sequence and _ for one character; a period matches a literal period. A pattern or escape supplied by another expression, or an unsupported PostgreSQL regex extension, returns an explicit translation error.
Snowflake SQL supports fractional elapsed seconds from timestamp differences, regex replacement with literal flags, and regex SUBSTRING with a literal pattern without capture groups. Replacement defaults to the first match; the g flag replaces all matches. Filtered, ordered ARRAY_AGG of scalar values retains matching NULL elements and returns NULL for no matching rows. CARDINALITY requires a proven one-dimensional array.
On Snowflake, canonical zero-argument RANDOM() returns a floating-point fraction greater than or equal to zero and strictly less than one. Native Snowflake SQL supplied in its own dialect retains its native function meaning. PostgreSQL single-precision REAL, FLOAT4 and FLOAT(p) with p below 25 return an explicit translation error because Snowflake cannot retain their rounding. PostgreSQL FLOAT, DOUBLE PRECISION and FLOAT(p) from 25 to 53 retain double precision.
Literal-array ANY / ALL comparisons require compatible declared scalar and element types. Numeric families, homogeneous text and compatible NULL values are supported. Unproven mixed types or text-to-numeric conversions return an explicit translation error; use consistently typed values.
Use AGE(a, b) with two date or timestamp values to return a calendar age directly, or extract its year, month, day, hour, minute, second or epoch inline. Calendar calculations retain month boundaries and the source time zone. Returned ages use the existing ISO duration response format. The existing source-driver conversion counts a returned year as 365 days and a remaining month as 30 days; do not use that returned duration for calendar arithmetic. An AGE value carried through another query layer or used in other arithmetic returns an explicit translation error. AGE operands must be stable date or timestamp expressions. Volatile or unknown functions in those operands return an explicit translation error.
For Snowflake SQL top-N per group, a lateral subquery may use equality correlation keys, a plain row projection, ordering, and a literal LIMIT with an optional literal OFFSET. Outer joins retain customers with no matches. Grouped, DISTINCT or windowed lateral projections and WITH TIES require a different query shape and return an explicit translation error. Correlated lateral top-N expressions must be stable, including their filters and ordering. Volatile or unknown functions return an explicit translation error because their values cannot be shared across outer rows.
Correlated lateral VALUES rows support matching declared column types with literal, column, COALESCE or CAST expressions, including NULL values.
Excel add-in. Excel Ask uses the Agent column above. The eight TESSALLITE.* worksheet functions retrieve governed values or diagnostics; they are not a general text/date/logical expression language. Excel's own worksheet functions are separate from server-side model calculations.
Worked example: share a cleaned customer name
Suppose customer_name contains Alice . You want reports in every channel to group that customer under ALICE.
- Create a user-defined attribute on the customer's table with the expression
upper(trim(customer_name))and output typevarchar. - Validate the expression, use the attribute to back a dimension named
CleanCustomer, configure that dimension's access, and deploy the model. See User-defined attributes. - Select the published dimension in the client:
| Channel | Use the shared calculation |
|---|---|
| JDBC | Select or group by the published CleanCustomer dimension in a model query. |
| Native Excel / XMLA | Put CleanCustomer on PivotTable Rows. No MDX Upper formula is required. |
| Agent Chat / Excel Ask | Ask "Show Sales by CleanCustomer", using the published measure and dimension. |
For the example input, the dimension value is ALICE in each channel. The attribute computes the label per source row; the report then groups those labels. Changing the expression in the model changes the shared definition after deployment.
Worked example: extracting a month versus grouping by month
An attribute EXTRACT(MONTH FROM ordered_on) returns 4 for an order on April 15, 2024. Used alone as a grouping dimension, that number groups April orders across years together. Include a year dimension when that is not the intended grouping.
An Agent expression date_trunc('month', ordered_on) identifies the beginning of April 2024, keeping the year and month together. This function is available in the Agent catalogue but not the attribute catalogue. For a shared calendar layout, use the model's date dimensions and configured time variants in all clients. Native Excel date formulas do not inherit the SQL function vocabulary.
Common mistakes when moving between channels
- A model attribute can use
left(account_code, 2)even though the Agent cannot callleftdirectly. Publish it as a dimension and ask for that dimension. - Native label-filter
Leftdoes not establish support for a free-form MDX calculated-field text expression. Use the documented native contexts below. - PostgreSQL documentation describes PostgreSQL. Names such as
concat_ws,to_charandto_dateare outside the saved-attribute and Agent catalogues here; a source may support them in an accepted governed SQL query.
Mathematical functions
All 49 names below are in the shared mathematical vocabulary. The 47 deterministic names are available to saved calculated measures and user-defined attributes. random and random_normal are query-time functions, available in structured requests and native mathematical queries rather than saved deterministic model fields.
Examples are scalar SQL expressions using constants so that the result is easy to check. They are not complete saved-measure definitions: replace the appropriate input with measure("your_measure"), or a column in an attribute. Floating-point results are shown rounded for readability. Availability and overloads still depend on the source and input types.
| Function | Argument counts | Purpose | Example expression | Result |
|---|---|---|---|---|
abs | 1 | Absolute value | abs(-17.4) | 17.4 |
cbrt | 1 | Cube root | cbrt(-64) | -4 |
ceil | 1 | Round upward | ceil(-42.8) | -42 |
ceiling | 1 | Round upward | ceiling(42.2) | 43 |
degrees | 1 | Radians to degrees | degrees(1.5707963267948966) | 90 |
div | 2 | Truncated quotient | div(-9,4) | -2 |
erf | 1 | Error function | erf(1) | 0.84270079 |
erfc | 1 | Complementary error function | erfc(1) | 0.15729921 |
exp | 1 | Exponential | exp(0) | 1 |
factorial | 1 | Factorial | factorial(5) | 120 |
floor | 1 | Round downward | floor(-42.2) | -43 |
gamma | 1 | Gamma function | gamma(6) | 120 |
gcd | 2 | Greatest common divisor | gcd(1071,462) | 21 |
lcm | 2 | Least common multiple | lcm(1071,462) | 23562 |
ln | 1 | Natural logarithm | ln(1) | 0 |
log | 1 or 2 | Logarithm | log(100) | 2 |
mod | 2 | Remainder | mod(-9,4) | -1 |
pi | 0 | Pi | pi() | 3.1415927 |
power | 2 | Exponentiation | power(2,3) | 8 |
radians | 1 | Degrees to radians | radians(180) | 3.1415927 |
random | 0 or 2 | Uniform random value | random() | From 0 inclusive to 1 exclusive |
random_normal | 0 or 1 or 2 | Normally distributed random value | random_normal(10, 2) | Varies; mean 10, standard deviation 2 |
round | 1 or 2 | Round a number | round(1.25,1) | 1.3 |
sign | 1 | Sign of a number | sign(-5) | -1 |
sqrt | 1 | Square root | sqrt(25) | 5 |
trunc | 1 or 2 | Truncate a number | trunc(-42.4382,2) | -42.43 |
width_bucket | 2 or 4 | Histogram bucket | width_bucket(5,0,10,5) | 3 |
acos | 1 | acos mathematical function | acos(0) | 1.5707963 |
acosd | 1 | acosd mathematical function | acosd(0) | 90 |
asin | 1 | asin mathematical function | asin(1) | 1.5707963 |
asind | 1 | asind mathematical function | asind(1) | 90 |
atan | 1 | atan mathematical function | atan(1) | 0.78539816 |
atand | 1 | atand mathematical function | atand(1) | 45 |
atan2 | 2 | atan2 mathematical function | atan2(1,1) | 0.78539816 |
atan2d | 2 | atan2d mathematical function | atan2d(1,1) | 45 |
cos | 1 | cos mathematical function | cos(0) | 1 |
cosd | 1 | cosd mathematical function | cosd(90) | 0 |
cot | 1 | cot mathematical function | cot(0.7853981633974483) | 1 |
cotd | 1 | cotd mathematical function | cotd(45) | 1 |
sin | 1 | sin mathematical function | sin(0) | 0 |
sind | 1 | sind mathematical function | sind(90) | 1 |
tan | 1 | tan mathematical function | tan(0) | 0 |
tand | 1 | tand mathematical function | tand(45) | 1 |
acosh | 1 | acosh mathematical function | acosh(1) | 0 |
asinh | 1 | asinh mathematical function | asinh(0) | 0 |
atanh | 1 | atanh mathematical function | atanh(0) | 0 |
cosh | 1 | cosh mathematical function | cosh(0) | 1 |
sinh | 1 | sinh mathematical function | sinh(0) | 0 |
tanh | 1 | tanh mathematical function | tanh(0) | 0 |
Arguments and common mistakes
log(value)is base 10 in PostgreSQL;log(base, value)selects a base. For example,log(2, 64)gives6. Native MDXLog(value)means natural logarithm; its two-argument SQL overload is not a native MDXLogformula.round(value[, digits])andtrunc(value[, digits])have one- and two-argument forms. PostgreSQL's two-argument decimal rounding needs an appropriate numeric input type. Rounding a value is different from formatting it.width_bucket(value, minimum, maximum, count)uses equal-width buckets. The alternativewidth_bucket(value, ARRAY[thresholds...])uses ascending thresholds;width_bucket(2, ARRAY[1,2,3])gives2. An Agent threshold array must be a one-dimensional primitive literal array.random()draws a value from 0 inclusive to 1 exclusive.random(minimum, maximum)is the two-argument overload.random_normal(),random_normal(mean)andrandom_normal(mean, standard_deviation)use zero, one or two arguments. Requests obtain fresh values rather than replaying cached draws.- Seed controls and
setseed()are not part of the analytical interface. NativeRnd()requests a fresh draw;Rnd(argument)is not supported. sin,cos,tanand their inverse forms use radians. The correspondingsind,cosd,tandand inverse names ending induse degrees.degreesandradiansconvert units.- Square roots require non-negative real inputs; logarithms require positive inputs. Domain, overflow and unsupported source/type errors are reported; no substitute approximation is invented.
Mathematical operators
Governed PostgreSQL expressions support these nine operators:
+ - * / % ^ |/ ||/ @
|/ 25.0 gives 5, ||/ -64.0 gives -4, and @abs(-5) gives 5. Separate an absolute operator from a negative operand: write @ -5. PostgreSQL reads adjacent @- as a different operator. Unary signs and parentheses are supported. In a Tessallite SQL query, / keeps the fractional part: 5 / 2 gives 2.5. A zero or NULL divisor gives NULL, so a ratio with no denominator appears empty. This query rule differs from raw PostgreSQL integer division. Use div(5, 2) when you want the truncated quotient 2.
Native MDX mathematics uses unary + - and binary + - * / % ^. The other SQL prefix operators are not MDX syntax.
Text functions
All names in this table are available in user-defined attributes. Saved calculated measures do not include this general text family. Agent support is the explicit subset marked Yes.
| Function / form | Purpose and example | Agent |
|---|---|---|
concat(a, b, ...) | Join pieces: concat('North', '-', '01') gives North-01. | Yes; 2-16 inputs |
upper(text) | upper('north') gives NORTH. | Yes |
lower(text) | lower('North') gives north. | Yes |
trim(text) | Remove surrounding spaces: trim(' North ') gives North. | Yes |
ltrim(text) | Remove leading spaces. | No |
rtrim(text) | Remove trailing spaces. | No |
left(text, count) | left('AB123', 2) gives AB. | No |
right(text, count) | right('AB123', 3) gives 123. | No |
substring(text, start, length) | substring('AB123', 3, 2) gives 12; positions start at 1. | Yes; 2 or 3 inputs |
length(text) | length('North') gives 5. | No |
replace(text, old, new) | replace('A-B', '-', '/') gives A/B. | No |
split_part(text, delimiter, part) | split_part('GB-LON', '-', 2) gives LON. | No |
lpad(text, length, fill) | lpad('7', 3, '0') gives 007. | No |
rpad(text, length, fill) | rpad('A', 3, '0') gives A00. | No |
The attribute parser also accepts substr for substring and char_length / character_length for length. Prefer the catalogue names when sharing expressions. SQL concatenation a || b is also available in attributes; it is an operator, not an additional Agent function.
Worked cleaning example. An attribute upper(trim(customer_name)) turns Alice into ALICE. Use a second expression such as concat(country_code, '-', account_code) for a display key. These are row calculations; they do not add up customers or decide which rows a persona sees.
NULL, conditional and type functions
| Function / construct | Calculated measure | Attribute | Agent |
|---|---|---|---|
coalesce(a, b, ...) | Yes | Yes | Yes; 2-16 inputs |
nullif(a, b) | Yes | Yes | Yes |
greatest(a, b, ...) | Yes | No | No |
least(a, b, ...) | Yes | No | No |
safe_div(a, b) | Yes; exactly two inputs | No | No |
safe_ratio(a, b) | Yes; exactly two inputs | No | No |
CASE WHEN ... THEN ... ELSE ... END | Yes | Yes | Structured conditional expression |
CAST(value AS type) | No general CAST | Yes | No general CAST function |
EXTRACT(part FROM value) | No | Yes | Yes; structured date expression |
coalesce(NULL, 7) gives 7. A real zero stays zero. nullif(0, 0) gives NULL. safe_div and safe_ratio give NULL for a zero denominator rather than treating the missing ratio as zero. The attribute parser recognizes IFNULL as COALESCE, but the Agent function name is coalesce.
Saved-measure and attribute conditionals can also use IF(test, when_true, when_false), normalized to CASE. Prefer CASE when sharing SQL expressions; the native DAX restriction below is a different context.
Saved measures require at least one existing measure reference. References to other calculated measures, time variants and semi-additive measures are refused. The per-row aggregation mode also requires the referenced measures to share one source table. See Calculated Measures before choosing that mode.
A reusable numeric model expression can be:
CASE WHEN measure("sales") > 0
THEN safe_div(measure("profit"), measure("sales")) * 100
ELSE 0
END
With profit 20 and sales 100, the result is 20. Calculated-measure conditions support comparisons, NOT and nested conditionals; compound AND / OR conditions are not currently accepted there. User-defined attributes support AND, OR, NOT, comparisons, IS NULL and IS NOT NULL. Agent predicates separately support AND, OR, NOT, comparisons, IN, BETWEEN, LIKE and NULL tests.
For row classification, an attribute CASE WHEN amount > 0 THEN 'Positive' ELSE 'Other' END returns Positive for 12 and Other for 0. Attribute result types are text, integer, numeric or date. Use an attribute to back a reusable calculated dimension; its column references must stay within its own table.
Attributes do not accept subqueries, aggregates, windows or LIKE / ILIKE. See User-defined attributes for the same-table validation workflow and how to use an attribute as a dimension.
Date and time
The three registered Agent date functions are date_trunc, extract and date_part. Units are literal values, not arbitrary SQL fragments.
| Task | Expression example | Result |
|---|---|---|
| Group by month in an Agent query | date_trunc('month', ordered_on) | An April date belongs to the period beginning April 1. |
| Extract a year in an attribute | EXTRACT(YEAR FROM DATE '2024-04-15') | 2024 |
| Extract a month in an attribute | date_part('month', DATE '2024-04-15') | 4; normalized to extraction syntax. |
Attribute date extraction is supported, but date_trunc is not in its saved catalogue. General calculated measures do not expose this date-function family. For calendar-aware comparisons, select configured time-variant measures rather than constructing calendar rules independently in each client.
KPI date-value expressions
KPI time windows and filters have their own date-expression catalogue: CURRENT_DATE, CURRENT_TIMESTAMP, LOCALTIMESTAMP, CURRENT_TIME, LOCALTIME, statement_timestamp(), clock_timestamp(), timeofday(), date_trunc, EXTRACT, age and CAST. Recognized equivalent spellings include now(), transaction_timestamp(), date_part and timestamp_trunc. Date words such as 'today', 'tomorrow', 'yesterday' and 'now' are also accepted in that context.
These expressions describe dates and intervals; they cannot read model columns. In this interface, statement_timestamp, clock_timestamp, timeofday and age are documented as PostgreSQL-specific. This catalogue does not add those functions to attributes or calculated measures. See KPIs for the date-window workflow.
Agent aggregates, statistics and windows
These are the remaining registered Agent functions, in addition to the mathematical, text, date and NULL functions above.
| Family | Exact Agent function names | Meaning / restriction |
|---|---|---|
| Group aggregates | sum, avg, min, max, count, count_distinct | Combine permitted values at the requested grouping. count_distinct counts distinct non-NULL values. |
| Share | ratio_to_total | One aggregate as a share of all returned groups; a zero total produces NULL. |
| Statistics | stddev, variance, percentile, median | Sample standard deviation/variance; continuous percentile. Percentile takes a literal fraction from 0 to 1, followed by its value expression. |
| Window ranking | row_number, rank, dense_rank, ntile | Require an ordered window; ntile takes a literal bucket count from 2 to 100. |
| Window values | running_sum, moving_avg | Require an ordered window. A moving-average size is a literal integer from 2 to 366. |
For group totals 10, 20 and 30, a share-of-returned-total expression gives about 0.1667, 0.3333 and 0.5. A running sum ordered over those groups gives 10, 30 and 60. Sorting is part of the calculation: a different order changes a running value.
Aggregate functions are not grouping dimensions. Window expressions belong in the returned values or ordering, not in a WHERE filter. Saved measures refer to model measures instead of embedding arbitrary SQL aggregates; attributes do not accept aggregates or windows. Model window variants are a separate configured-measure workflow.
Native Excel / MDX
Native calculated fields use the shared mathematical names with these client-language aliases:
| Native name | Meaning |
|---|---|
Sqr | Square root, sqrt |
Atn | Inverse tangent, atan |
Sgn | Sign, sign |
Int | Round downward, floor |
Fix | Truncate toward zero, trunc |
Rnd | Fresh random draw, random; no seed argument |
Log | Natural logarithm, ln; one argument |
Mathematical calls are case-insensitive; recognized VBA-prefixed spellings use VBA! or VBA.. Local scalar/control calculations are IIF, IsEmpty as a condition, Round, Abs and CoalesceEmpty. A scalar IIF condition is one comparison or IsEmpty; it is not a general Boolean-expression language. Text can be a direct local result or an IIF result, but cannot participate in arithmetic or arbitrary routed mathematics.
Round uses midpoint-to-even: Round(2.5, 0) gives 2 and Round(3.5, 0) gives 4. Precision +2 means two decimal places; Round(Sqr([Measures].[Sales]), +2) gives 1.41 for Sales 2. This differs from PostgreSQL decimal rounding.
Totals use their own completed model values. For Sales 9 and 16, Sqr([Measures].[Sales]) gives 3 and 4, while the total gives 5, not 7. An empty result is different from zero; native one-empty arithmetic and SQL NULL rules should not be interchanged. See native calculated fields.
Supported native query and context forms
These names are implemented in the listed contexts, not as unrestricted Microsoft MDX functions:
| Names / forms | Supported context |
|---|---|
Union, Except, Intersect, CrossJoin | Resolved member-set operations. |
Head, Tail, SubSet, .Item, Count / .Count | Set slicing, positions and cardinality; ordinary slicing arguments are whole-number literals. |
NonEmpty, set-selection IIF | Member-set selection; its supported conditions differ from scalar IIF. |
.Members, .AllMembers, .Children | Declared hierarchy/member enumeration. |
TopCount, BottomCount | Supported axis ranking with literal count and a bare model-measure ordering key. |
Filter | The supported value, label or Timeline filter shapes. |
Left, Right, InStr | Label-filter predicates on the iterated member's name; not a general calculated-field text library. |
CDate | Paired ISO-date bounds in the supported Timeline range form. |
Hierarchize, Generate, Ascendants, AddCalculatedMembers, DrilldownLevel | Recognized Excel member-tree/ancestor/expansion forms. |
StrToMember, StrToTuple | Resolve literal member/tuple unique names in supported metadata forms. |
.Name, .Caption, .UniqueName, .Level, .Hierarchy, .Properties | Member metadata over resolvable members. |
KPIValue, KPIGoal, KPIStatus, KPITrend | Read the governed KPI's defined properties. |
.CurrentMember, .Parent, .PrevMember, .NextMember, .Lag, .Lead | Navigation inside supported share/difference/context calculations. |
Rank, Running, Sum with Head / Rank | The supported ranking and cumulative-prefix calculations. |
Average / Avg with Descendants | The supported Index calculation shape. |
Aggregate | Explicit-member custom groups with a supported numeric expression. |
Axis, Order | Axis/context interpretation and the supported inner Order of a Rank; no general axis Order call. |
Unrestricted TopPercent, BottomPercent, TopSum, BottomSum and general axis Order are not supported. Configure time comparisons in the model rather than assuming every MDX date or financial function is available.
DAX query forms
The XMLA gateway answers a restricted DAX subset that produces one row of named values: ROW, supported single-value statements, and SUMMARIZECOLUMNS with named values and no group-by columns. CALCULATE is available in the supported contexts below. This is not a full DAX engine.
ROW accepts several label/value pairs. For example:
EVALUATE ROW("Revenue total", [Revenue], "Cost total", [Cost])
This returns one row with two named totals. Every named expression, including those in SUMMARIZECOLUMNS, SELECTCOLUMNS and ADDCOLUMNS, must be supported as a whole. An unsupported formula causes the whole query to fail before execution; no separate operands or partial results are returned. Select a published calculated measure when the desired formula is outside this subset.
An XMLA DAX request that produces rows per group or a member list is refused before execution. This includes grouped SUMMARIZECOLUMNS, SUMMARIZE, ADDCOLUMNS, TOPN and CALCULATETABLE, plus DISTINCT and VALUES member lists. For a grouped native Excel report, add model dimensions and measures to a PivotTable. SQL consumers can group the same model through JDBC.
Supported aggregate forms include SUM, AVERAGE, COUNT, MIN, MAX and DISTINCTCOUNT. Use a direct model measure or a documented complete aggregate form; do not assume arbitrary nesting or overriding a model measure's own aggregation is supported everywhere.
SELECTCOLUMNS and COUNTROWS are unsupported in this XMLA DAX subset.
SUMMARIZE accepts a plain table source; a source expression such as SUMMARIZE(FILTER(...), ...) is refused because its table semantics cannot be preserved. A plain VAR used by ROW is supported. Reusing a declared value under a later CALCULATETABLE filter is refused; the variable must not be recalculated in that new context. Nested TOPN is unsupported, and TOPN(0, ...) is refused by XMLA because an empty table cannot be represented as one row of values. Submit one complete EVALUATE statement at a time.
A filtered or time-based CALCULATE must be the query's only value. To show several such calculations together, publish the intended measures in the model. Filters using IN, ||, KEEPFILTERS, or VALUES as a filter table are refused rather than omitted.
Table names in filters and qualified measures must resolve to the selected model's relation. For a model named Sales, CALCULATE([Revenue], FILTER(Sales, Sales[Region] = "West")) retains that table and returns its West revenue. Naming UnknownTable causes an error; it never filters Sales instead. A FILTER condition uses its source table's columns; references to another table are refused. Calculations that require multiple table sources must be published as model measures.
TOTALYTD, TOTALQTD, TOTALMTD, SAMEPERIODLASTYEAR, PREVIOUSMONTH, PREVIOUSQUARTER and PREVIOUSYEAR resolve supported requests to existing model time variants. They are not a general date-arithmetic library; the dates operand must resolve to the base measure's declared Default date dimension by its backing identity. A missing variant, another date, an unresolved date, or extra function arguments is refused. Select the published time-variant measure directly when that equivalence cannot be established. The model's persona access and period requirements still apply.
DATEADD requests are unsupported. For a shift such as the previous month, select the published period-offset measure whose interval is configured in the model. This makes the requested period explicit.
Arbitrary scalar IF / DIVIDE formulas, filter-clearing ALL / ALLSELECTED / REMOVEFILTERS modifiers and TREATAS are outside the supported subset. Publish the intended calculation in the model and select that measure. The direct DAX query API has a separate tabular contract: supported EVALUATE SUMMARIZECOLUMNS(...) and EVALUATE SUMMARIZE(...) envelopes with its own expression validation. The XMLA scalar-result boundary does not apply to that API. A parsed name alone is not support.
Excel add-in worksheet functions
| Function | Purpose |
|---|---|
TESSALLITE.VALUE | Read a governed measure, with optional dimension filters. |
TESSALLITE.KPI | Read a named KPI property. |
TESSALLITE.MEMBERVALUE | Read a measure for one dimension member. |
TESSALLITE.LISTBYID | Return a named set's members as a spilled array. |
TESSALLITE.KPIVALUE | Read a KPI value by its identifier. |
TESSALLITE.KPIGOAL | Read a KPI target by its identifier. |
TESSALLITE.KPISTATUS | Read the governed KPI status code. |
TESSALLITE.DIAG | Report add-in runtime/storage diagnostics as text. |
For example, =TESSALLITE.VALUE("sales_model", "Revenue") retrieves the published Revenue measure. Use the add-in function guide for arguments, sign-in and recalculation behavior. Excel's own worksheet functions and native CUBE functions remain separate Excel features.
Before you use a function
- Choose the correct surface and syntax. A function available in one editor is not automatically available in every other one.
- Check source/version and input types. Mathematical functions do not create a missing source implementation.
- Choose row-level versus completed-measure calculation deliberately. A sum of roots is different from a root of a total.
- Handle NULL/empty and zero denominators explicitly. Zero is a real value, not a replacement for every missing result.
- Save and deploy a model definition before consumers can use the new published calculation.
- Use standard SQL functions in queries. While the system setting Standard SQL functions only is on (the default), a query that calls a source-specific function such as
pg_sleeporquery_to_xmlis refused (see System Configuration).
Further reading
The complete upstream references are useful when checking a source or client language. They do not expand Tessallite's supported editor/query subsets:
- PostgreSQL mathematical functions
- PostgreSQL text functions
- PostgreSQL date/time functions
- PostgreSQL conditional expressions
- Microsoft MDX function reference
- Microsoft DAX function reference