Attribute Value Analysis Metric

The Attribute Value Analysis Metric analyzes the value of a selected attribute based on an operator selected by the user, and returns a score of '100' (true) or '0' (false). Users are able to create an error message for instances when the metric returns a score of '0'; this message is meant to detail the reason for the '0' score and can have multiple translations.

Important: Metrics are used in conjunction with sufficiencies to determine the quality and completeness of a product's data. While this topic covers the functionality and configuration of the Attribute Comparison Metric, it is important that users are also familiar with sufficiencies and how they are combined with metrics; information regarding sufficiencies can be found in the Sufficiency Configuration Type documentation here.

Prerequisites

Before metrics can be created, a Setup Group must be configured to hold them. For information on configuring a setup group for metrics, refer to the Initial Setup for Metrics topic in the Metrics documentation here. For information on creating a metric, refer to the Creating and Editing Metrics topic in the Metrics documentation here.

Attribute Value Analysis Metric configuration

  1. From the Edit Metric Configuration wizard, select 'Attribute Value Analysis Metric.'

  1. With the Attribute Analysis Metric selected, click the ellipsis button () to select the attribute that you want to analyze, select an operator from the 'Operator' dropdown list, and input a value into the 'Value' text field.

Once an operator is selected from the 'Operator' dropdown list, a default error message will appear in the 'Error Message' text field, based on the selected operator.

Operator options include:

  • Is empty
  • Is not empty
  • Equal to
  • Not Equal to
  • Contains
  • Regular expression
  • Greater than
  • Less than
  • Length is equal to
  • Length is greater than
  • Length is less than

Note: If the attribute selected has a validation base type that does not allow for numbers, the 'Greater than' and 'Less than' operator options will not be available. If 'Is empty' or 'Is not empty' is selected as an operator, the 'Value' text field will be disabled.

In the example below, the user has selected 'Length' for the attribute and 'Equal to' for the operator. The user wants to know if the value of the 'Length' attribute is equal to '6 in.' If it is, then the returned score will be '100' (true). If it is not, then the returned score will be '0' (false), and this score will be accompanied with a message, as displayed in the 'Error Message' text field.

Note: In this example, the Value text field includes a validation base type of 'Numeric Text' (displayed as '12a'). The validation base type displayed in the Value text field is dependent on the validation base type of the attribute selected by the user for analysis. For information regarding validation base types, refer to the Base Unit ID, Name, and Value Aspects topic in the Outbound Map Data documentation here.

Note: If the user selects an attribute that is not valid for a product, the metric will be considered non-applicable for that product and no data quality information will be produced when the Sufficiency Data Calculator event processor is run.

  1. To edit the error message and/or add additional translations, click on the 'Error Message' editor button.

The 'Edit messages' window appears. Note that the 'Message' text field is editable. Descriptive text below the text field describes in detail how the placeholders included in the error message work in order to create an error message. Although the default error message (or something similar) is suggested, users are able to edit the error message, depending on their individual needs.

Note: Although the error message can be edited by the user, the placeholders themselves (attribute_id, attribute_value) cannot be edited. If the placeholders are edited, the user will receive a validation error message when attempting to save the edited message. When the metric is run, placeholders are replaced by the ' real values,' e.g., 'attribute_id' would be replaced with the name of the attribute that the metric is evaluating.

  1. Select the 'Translations' flipper and click the green plus sign located next to 'Add translation.'

  1. Click on the arrow located in the 'Language' dropdown menu; in the example below, the user has opened the dropdown menu and selected 'French.'

 
  1. Once a language is selected, edit the message to reflect the language specified for translation.

  1. Click the green plus sign to add another translation or 'OK' to close the 'Edit messages' window.
  1. Click 'Save' to close the Edit Metric Configuration wizard.

The metric is saved.

Note: The localized error messages are displayed by using locales; they are not context-dependent. For more information about locales, refer to the Localization topic in the Administrative Portal documentation here. For more information about localized messages, refer to the Localized Messages for JavaScript Business Rules topic in the Business Actions documentation here.

Once the metric is added to a sufficiency and the sufficiency is run, the results are displayed in the sufficiency panel within the Web UI. In the example below, the Attribute Value Analysis Metric (titled 'AttC') has been added to the sufficiency 'Product Measurement Requirements,' and returned a score of '100' because the attribute 'Length' value is equal to '6 in,' which was the value input into the metric. Because the returned score is '100' and not '0,' there is no accompanying error message.

Validation Errors

In certain instances validation errors can occur, depending on the attribute selected for analysis. A validation error (accompanied by an error message) will occur if:

  • The provided value is not valid based on the selected attribute validation base type.
  • The selected attribute is multivalued.

The following instances will also produce validation errors. However, these errors will not appear until the metric is run. The error message will appear in the Background Process Log of the Data Sufficiency Calculator event processor.

  • The selected attribute has a unit but the value provided by the user in the metric configuration has no unit.
  • The selected attribute has no unit but the value provided by the user in the metric configuration has a unit.
  • The selected attribute and the value provided by the user in the metric configuration have different base unit conversion rules.
  • The selected attribute's unit and/or the value's unit provided by the user in the metric configuration has no base unit conversion rule.

For more information regarding units, including base units and conversion rules, refer to the Units topic in the System Setup documentation here.