All eazyBI for Jira eazyBI for Confluence Private eazyBI

Min

Returns the minimum value of a numeric expression evaluated over a set.

Before you create a calculated measure using the MIN function, check whether you can use standard functionality to perform statistical calculations.

Syntax

Min(Set_Expression, Numeric_Expression)

Arguments

Set_Expression

MDX expression that returns a set for which to return the Min value.

Numeric_Expression

MDX expression that returns a number by which the Min value will be determined.

On Cloud and since eazyBI version 9.1, the Max() and Min() functions can interpret the dates without converting them to timestamps.

Returns

Number

Min value of Numeric_expression over the given set.

Examples

Example1

The following example calculates the minimum time, in days, for unresolved issues from the last status change to today.
The formula pulls in only unresolved issues, filters them to those relevant to the report selections, and calculates days for those issues from the status update date to now.

Min(
  Filter(
    Descendants([Issue].CurrentMember, [Issue].[Issue]),
    -- for unresolved issues only
    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 created] > 0
  THEN
    -- calculated days in status
    DateDiffDays([Measures].[Issue status updated date], Now())
  END
)

Example 2

The following example finds the minimum number of resolved issues in the last 52 weeks.

Min(
  {[Time.Weekly].[Week].CurrentDateMember.Lag(52): 
   [Time.Weekly].[Week].CurrentDateMember.PrevMember},
  CoalesceEmpty(
    ([Measures].[Issues resolved], [Time].DefaultMember),
    0
  )
)

See also