This reference lists 7 DAX other advanced functions, with frequently used functions marked 🔥. Each function includes syntax, an example and parameter notes.
| Function | Description | Syntax | Example |
|---|---|---|---|
CURRENTGROUP |
Returns the current group (used inside GROUPBY) | CURRENTGROUP() |
GROUPBY(Sales, Sales[Region], "Total", SUMX(CURRENTGROUP(), Sales[Amount])) |
ERROR |
Raises an error | ERROR(<text>) |
IF(Sales[Amount] < 0, ERROR("Negative values not allowed"), Sales[Amount]) |
ISDDSCOLUMN |
Checks whether the column is a direct row-security column of the data model | ISDDSCOLUMN(<column>) |
ISDDSCOLUMN(Employee[Email]) |
ROLLUP |
Specifies the columns to roll up in SUMMARIZE | ROLLUP(<column>[, <column>]) |
SUMMARIZE(Sales, ROLLUP(Sales[Region], Sales[Product]), "Total", SUM(Sales[Amount])) |
ROLLUPADDISSUBTOTAL |
Determines whether to subtotal a column in SUMMARIZE | ROLLUPADDISSUBTOTAL(<grandtotal>, <column>, [<column>]) |
SUMMARIZE(Sales, Sales[Region], "Total", SUM(Sales[Amount]), ROLLUPADDISSUBTOTAL("Region Total", Sales[Region])) |
ROLLUPISSUBTOTAL |
Checks whether the column is a subtotal | ROLLUPISSUBTOTAL(<grandtotal>, <column>, [<column>]) |
SUMMARIZE(Sales, Sales[Region], "IsSubtotal", ROLLUPISSUBTOTAL("Region Total", Sales[Region])) |
TOPN |
Returns the top N rows of a table | TOPN(<n_value>, <table>, <orderBy_expression>, [<order>]) |
TOPN(10, Sales, SUM(Sales[Amount]), DESC) |
From Online Toolbox (www.vba.net)