Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Example

Formats a number or date to a string.

Syntax

Format(Numeric_Expression, String)
Format(DateTime, String)

Arguments

Numeric_Expression
MDX expression that returns number.
DateTime
Date expression.
String
String that defines formatting of result.

Examples

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

Above example will return a string value of Issue Project Name that follows after - formatted to three digits. So  So if the Issue Project name is is Demo-12, then the returned result would be 012value will be 12.

See also

ExtractString and Val functions that are used in the example.