LOOKUPWITHTOTALS DAX Function (Filter)
Identifies cells where specified columns match evaluated expressions, and retrieves a column value (only when a single cell is identified) or calculates an expression’s value from those matching cells. LOOKUPWITHTOTALS defaults the non-specified columns to the total, whereas LOOKUP does not change the filter over non-specified columns.
Syntax
Parameter | Attributes | Description |
---|---|---|
Result_ColumnOrExpression |
Specifies the column to retrieve a value from or an expression to evaluate over the identified cells where search_columns match search_values. |
|
Search_Column | Repeatable |
The column that contains search_value. |
Search_Value | Repeatable |
The value that you want to find in search_column. |
Return values
The value of the column found, or the result of the expression evaluated in the matching cells.
Remarks
LOOKUPWITHTOTALS can be expressed by using COLLAPSE. Indeed, the two following formulas are equivalent:
LOOKUP 2018 Totals = COLLAPSEALL ( LOOKUP ( [Sales Amount], [Year], 2018 ) ) LOOKUP 2018 Totals = LOOKUPWITHTOTALS ( [Sales Amount], [Year], 2018 )
Related functions
Other related functions are:
Last update: Apr 8, 2025 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo
Microsoft documentation not available.
The function may be undocumented or unsupported. Check the Compatibility box on this page.