Strategy ONE

Create and Edit Base and Advanced Metrics in Mosaic Studio

Mosaic Studio includes two types of metrics, basic metrics and advanced metrics. Basic metrics are metrics gathered from your initial import or you can create a base metric by converting an attribute. Use one or more base metrics to create a new advanced metric that fits your business needs.

See the following topics:

Create a Base Metric

  1. Create a Mosaic Model Using Mosaic Studio and Import Data.

  2. In the Objects panel, right-click a table and click Create Base Metric

    or

    Right-click an attribute and click Convert to Base Metric.

Edit a Base Metric

  1. Create a Mosaic Model Using Mosaic Studio and Import Data.

  2. In the Objects panel, right-click a base metric and choose Edit.

    An explanation of the metric displays in Auto Metric.

  3. Click the metric name, type a new name, and press Enter.

  4. To edit the expression:

    1. Select the target expression to display in the Expression and Column pane.

    2. Click Column Browser in the expression editor and choose a table.

    3. Select columns in the Columns pane.

    4. Click Functions in the Columns pane to search for and select functions.

      To locate a function, type its name in the Search box. You can also browse for a function by selecting a function category (such as Basic Functions or String Functions) from the drop-down list.

    5. Use the Expression pane to define the new expression.

  5. To edit the base metric format, click Formatting and enter your edits.

  6. To edit the metric properties, click Options and edit your Properties.

Create an Advanced Metric

  1. Create a Mosaic Model Using Mosaic Studio and Import Data.

  2. Click Create Metric.

  3. Click the metric name, type a new name, and press Enter.

  4. Choose a data type for the advanced metric in the Data Type drop-down list.

  5. Type a Description for the metric.

  6. Expand the Functions pane to search for and select a function.

    • To locate a function, type its name in the Search box.

    • You can also browse for a function by selecting a function category (such as Basic Functions or String Functions) from the drop-down list.

  7. Use the Formula pane to define the expression for the advanced metric.

    • Define the metric's formula, which consists of arithmetic operators (+, -, *, and /) and functions. The operators and functions can be applied to attributes or metrics.

    • An example of a compound metric formula is RunningAvg(Cost), where Cost is a metric and RunningAvg is a function that calculates the running average.

    • Another example is Sum(Cost) + Sum(Profit), where Cost and Profit are metrics and Sum is a function that calculates the sum. In this case, the sum of the Cost metric is added to the sum of the Profit metric.

    You can also use Auto Metric to help you create your advanced metric. For more information, see Auto Metric.

  8. Click Validate to ensure the expression is correct.

  9. If the expression is incorrect, a suggestion displays in Auto Metric. Click Update or Copy under the expression.

    If the proposed metric does not meet your needs, type a follow up message including generic metric related questions or questions specific to your metric. For example, "What's a level metric?" and "Add a level with Country.".

  10. Click Save.

Edit an Advanced Metric

  1. Create a Mosaic Model Using Mosaic Studio and Import Data.

  2. In the Objects panel, right-click an advanced metric and choose Edit.

    An explanation of the metric displays in Auto Metric.

  3. To change the metric name, click the metric name, type a new name, and press Enter.

  4. To edit the formula, type your changes in the Formula pane.

  5. To edit the metric category, click Formatting.

  6. To define metric properties such as an alias, pushdown behavior, joins, and to set as HTML content, click Options.

Attribute and Metric Default Icons

You can use auto-semantic-role-detection for attributes (for example, Person, Geo, Time/Date, Email, Phone Number) and fact metrics (for example, currencies, percentages). A Mosaic model built using detection can provide more context in subsequent data analysis to assist in achieving more accuracy. Detected roles will display special icons in your Mosaic model and wherever your Mosaic model is supported.

Supported Roles

The following roles are supported and are assigned their own icons. Roles that include numbers are formatted automatically.

  • Time dimension: Date, Time, Datetime, Year, Quarter, Month, and Weekday

  • Geo dimension: Country, State, City, Location, Country, Area code, Zip code, Latitude, and Longitude

  • Person: Person, Name, Age, Gender, Birthday, Education, and Title

  • Number: Fix, Currency, Percentage, Faction, and Scientific

  • Others: Email, Phone number, and Url

Role Detection

Imported tables that contain supported role information will automatically link to relevant attributes and fact metrics. You can identify which objects have roles by their icons.

Year, Quarter, Month, Weekday, Fixed, Faction, and Scientific roles do not have icons. Fixed, Faction, and Scientific roles' format will be automatically updated.

For example, if your data is imported using a csv file, the following roles will be identified and assigned the associated icon:

  • Country_ID and alpha-2 is detected as GEO.Country Role

  • Year is detected as TIME.Year Role

  • Date is detected as TIME.Date Role

  • Growth rate is detected as NUMBER.Percentage Role