All eazyBI for Jira eazyBI for Confluence Private eazyBI

Format

Formats a number or date to a string.

You can choose the measure formatting for the output also in the editor field Formatting when creating a new calculated measure.

Syntax

Format(Numeric_Expression, String_Expression)

or

Format(Date_Expression, String_Expression)

Arguments

Numeric_Expression

MDX expression that returns a number.

Date_Expression

MDX expression that returns a date.

String_Expression

A string value that defines the formatting of the result.

For more details (and string templates), see how to Format string content.

Examples

The example below will return a version release date as a string:

'Version release - ' || + Format([Fix Version].CurrentHierarchymember.Get('Release date'), 'Medium Date')

See the example report Version report in our demo account. The calculated measure Predicted dates show several milestones on the timeline, including the version release date using the code above.


Here is another example of how to extract and show some numeric values. The example below will return a string value of Issue Name that follows after - formatted to three digits. So if the Issue name is Demo-12, the returned result would be 012.

Format(
  Val(
    ExtractString(
      [Issue].CurrentMember.Name, 
      '.*-(\d+)', 1
    )
  ),
  "000"
)


See also

ExtractString and Val functions are used in the example.

Formatting for calculated measures and properties