Skip to content

Latest commit

 

History

History
311 lines (231 loc) · 15.1 KB

reference.mdx

File metadata and controls

311 lines (231 loc) · 15.1 KB

DAX API reference

The DAX API supports the following functions.

If you'd like to propose a function to be supported in the DAX API, please contact the customer success team in Cube Cloud.

DAX functions

The DAX API currently implements a subset of functions supported by DAX.

Aggregation functions

Learn more in the relevant section of the DAX documentation.

Function Unsupported features Caveats
AVERAGE
AVERAGEA Non-numeric values
AVERAGEX Non-base table as input table
COUNT
COUNTA
COUNTAX Non-base table as input table
COUNTBLANK
COUNTROWS Disregards input table expression and always returns 1
COUNTX Non-base table as input table
DISTINCTCOUNT Blanks are ignored
DISTINCTCOUNTNOBLANK
MAX 2 arguments Blanks are disregarded instead of being treated as 0
MAXA
MAXX Non-base table as input table
MIN 2 arguments Blanks are disregarded instead of being treated as 0
MINA
MINX Non-base table as input table
SUM
SUMX Non-base table as input table

Date and time functions

Learn more in the relevant section of the DAX documentation.

Function Unsupported features Caveats
DATE Non-literal date parts
DAY Text date input
HOUR Text date input
MINUTE Text date input
MONTH Text date input
NOW Returns datetime in UTC time zone
QUARTER Text date input
SECOND Text date input
TIME Non-literal date parts. Execution outside DATE(...) + TIME(...) expression
TODAY Returns date in UTC time zone. Time is at 12:00:00 AM; contrary to documentation, Analysis Services returns that time
UTCNOW
UTCTODAY Time is at 12:00:00 AM; contrary to documentation, Analysis Services returns that time
WEEKDAY Text date input
YEAR Text date input

Filter functions

Learn more in the relevant section of the DAX documentation.

Function Unsupported features Caveats
ALL 2+ arguments Doesn't clear filter context, silently ignored
CALCULATE Creating a nested filter context
CALCULATETABLE Creating a nested filter context
FILTER
KEEPFILTERS Doesn't modify behavior, silently ignored

Financial functions

Learn more in the relevant section of the DAX documentation.

No financial functions currently supported.

Information functions

Learn more in the relevant section of the DAX documentation.

Function Unsupported features Caveats
ISAFTER
ISBLANK Blanks are treated as equivalent to nulls and vice versa
ISEVEN
ISODD
ISONORAFTER
NONVISUAL Doesn't modify behavior, silently ignored
USERCULTURE Always returns "en-US"

Logical functions

Learn more in the relevant section of the DAX documentation.

Function Unsupported features Caveats
AND
FALSE
IF Variant data types
NOT
OR
SWITCH
TRUE

Math and trig functions

Learn more in the relevant section of the DAX documentation.

Function Unsupported features Caveats
ABS
ACOS
ASIN
ATAN
CEILING Significance other than 1
COS
EXP
FLOOR Significance other than 1
INT
LN
LOG Base other than 10
LOG10
MOD
MROUND Multiple other than 1
PI
POWER
QUOTIENT
RAND
ROUND Num digits other than 0
ROUNDDOWN Num digits other than 0
ROUNDUP Num digits other than 0
SIN
SQRT
SQRTPI
TAN
TRUNC Num digits other than 0

Other functions

Learn more in the relevant section of the DAX documentation.

Function Unsupported features Caveats
BLANK Blanks are treated as equivalent to nulls and vice versa

Parent and child functions

Learn more in the relevant section of the DAX documentation.

No parent and child functions currently supported.

Relationship functions

Learn more in the relevant section of the DAX documentation.

No relationship functions currently supported.

Statistical functions

Learn more in the relevant section of the DAX documentation.

Function Unsupported features Caveats
SAMPLE Doesn't evenly distribute rows, taking top N instead (acts as the TOPN function)

Table manipulation functions

Learn more in the relevant section of the DAX documentation.

Function Unsupported features Caveats
ADDCOLUMNS Aggregate expressions
DISTINCT (column)
DISTINCT (table) Filter context for table expressions
IGNORE 2+ arguments Doesn't modify filter context, silently ignored
NATURALLEFTOUTERJOIN
ROLLUPADDISSUBTOTAL grandtotalFilter
ROLLUPGROUP
ROW
SELECTCOLUMNS Optional aliases (currently mandatory)
SUBSTITUTEWITHINDEX
SUMMARIZE Named expressions (aggregations/measures)
SUMMARIZECOLUMNS
TOPN Non-literal N value
TREATAS Non-literal tables as table expressions
VALUES

Text functions

Learn more in the relevant section of the DAX documentation.

Function Unsupported features Caveats
CONCATENATE
EXACT
FIND Start num other than 1 and not found value other than 0
LEFT
LEN
LOWER
MID
REPT Returns empty string when num times is 0
RIGHT
SUBSTITUTE Instance number
SEARCH Execution outside filter context functions
TRIM Trimming inner whitespace
UPPER
VALUE

Time intelligence functions

Learn more in the relevant section of the DAX documentation.

No time intelligence functions currently supported.

Miscellaneous functions

Function Unsupported features Caveats
SAMPLEAXISWITHLOCALMINMAX Silently ignored, returning input table expression