Zeroes not Nones

Date: 25 March 2018

Category: Power BI

Tag: Visuals

If you have ever wanted to display a count of the number of rows in a table, or the number of values in a column, on a Card, Guage or other Power BI visualisation you’ll have likely observed the fact that (None) rather than 0 is returned if no records are found.

Simple Solutions

For a while, I had been using DAX expressions similar to the following to get aroound this:

Measure = IF (CALCULATE ( SUM( Table[Column] ) ) = BLANK(),0,CALCULATE ( SUM Table[Column] ) ))

That was, until I can across a solution provide by user Sean in this Power BI community post:

Measure = CALCULATE ( SUM (Table[Column] )) + 0

A fantastically simple, and much neater, solution.