MicroStrategy ONE

Formatting a metric

Metrics can be formatted independently of the report(s) on which they appear. When you format a metric, you can format the metric's column or row header, and you can also format the data that will appear for that metric.

You can apply special formatting to numeric values that appear when a metric is calculated, such as currency, percentages, and date format style. You can apply special font styles and sizes, and you can determine cell background colors or patterns. This formatting can help analysts more easily identify specific data. For example, you might have all sales data appear in a blue font, while profit data appears in a bold green font.

Metric formatting can be performed using either of the following interfaces:

  • Metric Editor: Use this method to format one metric at a time. Formatting changes made using this method affect the metric no matter which report the metric is included on. For details on accessing the Metric Editor, see Viewing and working with metrics: The Function Editor.
  • Find and Replace feature: Use this method to format a number of metrics at one time with the same format.

For information about using the Find and Replace feature to format metrics, see the Advanced Reporting Help. For specific steps to use the feature, as well as information on each option in the software, open the Find and Replace feature from Developer's Tools menu, and then click Help.

For information to format metric data on a report so that the formatting applies to that report only, see Formatting for easier data analysis.

Formatting a metric's header and values

You can format a metric's display of numeric values, font styles and sizes, cell display colors, and so on. You can select different formatting options for metric column headers (the title of the metric) and metric values (the numbers calculated by the metric and displayed in the report). This formatting, called metric-level formatting, is used to display the metric when the metric is placed on a report. You can override metric-level formatting in a specific report by defining formatting options on the report (except for graph colors, as described below). For more information on metric formatting at the report level, including how the different levels work together, see the Advanced Reporting Help.

You can format the:

  • Number display: Determine how numeric data is displayed. For example, you can format numbers to appear as dollars and cents, as percentages, or even as scientific notation. You can also determine whether the values appear with or without decimal places.

Number formatting is only relevant for metric values. If a number appears in your report results that does not reflect a metric calculation, such as a list of product identification numbers, you cannot format the data.

  • Alignment: Control vertical and horizontal alignment of data within a cell, and select whether or not to wrap text. For example, you can right justify and pad the data.
  • Font: Select the font name, script, size, and color of the data; whether the font is bold, underlined, or italicized; and whether to strikeout the text.
  • Borders: Select the style and color of the border line. You can select which borders (top, bottom, left, and right) are displayed, or hide all the borders.
  • Background: Apply a background color, including a gradient.
  • Graph: Apply a background color for a metric when it is displayed as a series in a graph report. (Available for metric headers.)

By default, the graph color that you define for a metric overrides any default color schemes for the graph report, although you can disable this metric formatting. For more detailed steps, see Defining a graph color for metrics.

To format metric values or headers

  1. In MicroStrategy Web, click the metric you want to format. The Metric Editor opens in either Function Editor mode or Formula Editor mode, depending on the type of metric that you chose to edit.
  2. Click the Format icon .
  3. Select the area of the metric to format by selecting one of the following from the drop-down list at the top left:

    • To format the metric column headers (the titles), select Metric Headers.
    • To format the metric values (the numbers calculated by the metric), select Metric Values.
  4. From the left, select the type of formatting to define for the metric:

    • Number
    • Alignment
    • Font
    • Borders
    • Background
    • Graph (available only for metric headers)

    Select the appropriate options to define the formatting for the metric.

  5. Repeat the appropriate steps above to add additional formatting as desired.
  6. Click OK.
  7. Click Save.

Customizing a metric number format

You can create a custom format syntax for metric values to be displayed on the report. Following are some examples of common customized formatting you can apply to a metric:

  • Cut off decimal numbers automatically after a certain number of digits, or truncate the leading zero in a decimal so that 0.2 becomes .2.
  • Align decimals down a column, rather than left-aligning or right-aligning.
  • Include strings that always appear with the calculated value, such as "this month", "sales=", or "Customer no.".
  • Provide a specialized date or time format, such as Feb 3, 06 or 01h 32m.

To create a custom metric format

  1. In MicroStrategy Web, click the metric you want to format. The Metric Editor opens in either Function Editor mode or Formula Editor mode, depending on the type of metric that you chose to edit.
  2. Click the Format icon .
  3. Select the area of the metric to format by selecting one of the following from the drop-down list at the top left:

    • To format the metric column headers (the titles), select Metric Headers.
    • To format the metric values (the numbers calculated by the metric), select Metric Values.
  4. From the list of categories on the left, select Number.
  5. Select Custom.
  6. Enter your custom format syntax in the Custom field. See the Advanced Reporting Help for a table of formatting symbols you can use and examples you can replicate.
  7. Click OK.
  8. Click Save.