All eazyBI for Jira eazyBI for Confluence Private eazyBI

NonZero

EAZYBI Returns blank if the numeric expression has the result 0. All other numeric values will be returned as they are.

Syntax

NonZero(Numeric_Expression)

Arguments

Numeric_ExpressionMDX expression that returns a number.

Examples

Example 1

The following example will return the difference between created and resolved issues. If the result is 0, it is replaced by a blank. Blank rows can be hidden using the "Hide empty" button from the eazyBI toolbar.

NonZero(
  [Measures].[Issues created]
  -
  [Measures].[Issues resolved]
)

Example 2

The following example returns the maximum number of days between the issue resolution date and the last date the status was updated. In case there is another status to complete the issue, both dates won't match. If the dates matcha and the DateDiffDays() function returns the result 0, it is replaced by a blank. Blank cells make the cleaner look and can be hidden using the "Hide empty" button from the eazyBI toolbar.

NonZero(
Max(
  Filter(
    Descendants([Issue].CurrentMember, [Issue].[Issue]),
    -- for unresolved issues only
    NOT IsEmpty([Measures].[Issue resolution date])
    AND
    -- show on time for issue creation date
    DateInPeriod(
      [Measures].[Issue created date],
      [Time].CurrentHierarchyMember
    )
  ),
  -- calculate days in current status for each relevant issue
  CASE WHEN
    -- check if issue is relevant for the report
    [Measures].[Issues resolved] > 0
  THEN
    -- calculated days in status
    DateDiffDays(
      [Measures].[Issue resolution date],
      [Measures].[Issue status updated date]
    )
  END
))

See also