How to get the real value (0 or no data) in a report

Hello, I hope you can help me with my question.

In my team it would be helpful to us that when the result of a measurement was 0 it would get a 0 in the report, and when it had no value it would have a gap in the report (currently there is always a gap whether the value is 0 or null).

How could this be achieved?

Thank you very much in advance

Hi @JPerez,

In general, the blank cell appears in the following cases:

  • it is stated in the calculation that zero converts to empty
  • the calculation result is not defined
  • the imported value is empty

You might address these situations differently, depending on the reason for the blank result.

If it states in the existing measures that zero converts to empty and code has the following function - NonZero(<numeric expression>) - please consider removing the NonZero part.
Please read more about NonZero function here - Nonzero.

If you want to convert all empty results to zero - you might use CoalesceEmpty(<original result>, <new result if previous is empty>) function.
Please read more about CoalesceEmpty here - CoalesceEmpty.

If neither of the above applies to your case - most probably you would like to display zero according to some other conditions. Then you might create a conditional construction that only uses CoalesceEmpty on certain conditions.
Please see an example below - if no issues were resolved on the day, it would generally display empty. The expression checks if there were any new bugs on the day - it displays zero; if there were no new bugs - it stays empty.

CASE WHEN
 ([Measures].[Issues created],
  [Issue Type].[Bug])
    >0
THEN
 CoalesceEmpty([Measures].[Issues resolved],0)
ELSE
 [Measures].[Issues resolved]
END

Please write to support@eazybi.com if you have complex conditions and need assistance building the expression.

Kind regards,
Oskars / support@eazyBI.com