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
-
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
-
In the Objects panel, right-click a base metric and choose Edit.
An explanation of the metric displays in Auto Metric.
-
Click the metric name, type a new name, and press
Enter
. -
To edit the expression:
-
Select the target expression to display in the Expression and Column pane.
-
Click Column Browser
in the expression editor and choose a table.
-
Select columns in the Columns pane.
-
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.
-
Use the Expression pane to define the new expression.
-
-
To edit the base metric format, click Formatting and enter your edits.
-
To edit the metric properties, click Options and edit your Properties.
Create an Advanced Metric
-
Click Create Metric.
-
Click the metric name, type a new name, and press
Enter
. -
Choose a data type for the advanced metric in the Data Type drop-down list.
-
Type a Description for the metric.
-
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.
-
-
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.
-
-
Click Validate to ensure the expression is correct.
-
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.".
-
Click Save.
Edit an Advanced Metric
-
In the Objects panel, right-click an advanced metric and choose Edit.
An explanation of the metric displays in Auto Metric.
-
To change the metric name, click the metric name, type a new name, and press
Enter
. -
To edit the formula, type your changes in the Formula pane.
-
To edit the metric category, click Formatting.
-
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
andalpha-2
is detected asGEO.Country Role
-
Year
is detected asTIME.Year Role
-
Date
is detected asTIME.Date Role
-
Growth rate
is detected asNUMBER.Percentage Role