Please note javascript is required for full website functionality.

Blog

Power Pivot Principles: The A to Z of DAX Functions – COALESCE

3 May 2022

In our long-established Power Pivot Principles articles, we continue our series on the A to Z of Data Analysis eXpression (DAX) functions. This week, we look at COALESCE.

The COALESCE function

I’m drawing a bit of a BLANK with this one.  Oh no, I remember.  The COALESCE function returns the first expression that does not evaluate to BLANK.  However, if all expressions evaluate to BLANK, then of course, BLANK is returned.

The COALESCE function employs the following syntax to operate:

COALESCE(expression1, expression2 [, expression 3, …])

The COALESCE function has the following arguments:

  • expression1, etc: the first arguments are required.  These are any DAX expressions that return a scalar result.  Expressions may be of different Data Types.

Please see my example below:

Returns the sum of all values in the SalesAmount column (field) in the FactInternetSales table, or else zero [0]. This is a particularly useful technique for converting BLANK values to zero [0].

Come back next week for our next post on Power Pivot in the Blog section. In the meantime, please remember we have training in Power Pivot which you can find out more about here. If you wish to catch up on past articles in the meantime, you can find all of our Past Power Pivot blogs here.

Newsletter