Cheat Sheets/Power BI/ALLSELECTED
DAX function

ALLSELECTEDDAX function reference

Respect slicer/outer selection.

Syntax

dax
ALLSELECTED(<table> | <column1> [, <column2>, …] | )

Examples

dax
CALCULATE(SUM(Sales[Amount]), ALLSELECTED(Sales[Region]))
A number
dax
DIVIDE(SUM(Sales[Amount]), CALCULATE(SUM(Sales[Amount]), ALLSELECTED(Sales)))
Percent of the visible (sliced) total, not the whole table

The argument-less form resets to the query's outer filter context rather than a specific table.

dax
CALCULATE([Total Sales], ALLSELECTED())
Total for everything currently selected in the report

Common mistakes & gotchas

Related DAX functions

From Filter context

← Back to the Power BI (DAX) cheat sheet