Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

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([Project (Job)].CurrentMember.Name, 
    '.*-(\d+)', 1)
  )
)

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

See also

ExtractString and Val functions that are used in the example.

  • No labels