Back to all posts

ALLSELECTED Function in Power BI

ALLSELECTED : The ALLSELECTED function in DAX is used to return all the rows in a table, or all the values in a column . This is particularly useful in sce…

ALLSELECTED: The ALLSELECTED function in DAX is used to return all the rows in a table, or all the values in a column. This is particularly useful in scenarios where you want to apply calculations that consider the currently selected rows or values in a report visual.

SQL
Total Sale (ALL) = CALCULATE(
                    SUM(SalesTable[Amount]),
                    ALL(SalesTable)
                )

Total Sale (ALLSELECTED) = CALCULATE(
                    SUM(SalesTable[Amount]),
                    ALLSELECTED(SalesTable)
                )

Total Sale (REMOVEFILTERS) = CALCULATE(
                    SUM(SalesTable[Amount]),
                    REMOVEFILTERS(SalesTable)
                )

Keep building your data skillset

Explore more SQL, Python, analytics, and engineering tutorials.