Data requirements
This topic covers the input data requirements for NLG Apps and Arria Answers. If you get unexpected results, please check that your data meets the requirements stated below.
The topic is organized as follows:
Note
The topic assumes the data is being uploaded in tabular form (either a CSV or XLSX file).
Measures
A measure is a numeric, quantitative field in your data. Measures in the sample dataset include Sales and Profit.
Note
The Arria visualization categorizes MicroStrategy metrics as measures.
The requirements for measures are:
Decimal numbers must use a period for the decimal separator.
If using thousand grouping separators, they must be commas.
Aggregation type must be one of the following: Sum, Average, Minimum, Maximum, or Count*.
Tip
*Arria Answers does not support the Count aggregation type.
See Query types for guidance on which aggregation types are required by each type of query.
Tip
Not all aggregation and entity type combinations are supported by every NLG app. See the NLG Apps Directory for app-specific guidance.
Dimensions
A dimension is a categorical, qualitative field in your data. Dimensions in the sample dataset include Country and Product.
Note
The Arria visualization categorizes MicroStrategy attributes as dimensions.
The values in a dimension field are known as dimension instances. For example, Canada and Germany may be instances of the Country dimension.
There are no formal restrictions for categorical dimensions. The values are typically textual or alphanumeric rather than purely numeric; however, purely numeric outputs are allowed.
In Arria for MicroStrategy, the term time dimension refers to a special type of dimension that contains date values. Time dimensions are used to analyze your data by day, month, quarter, or year. The data requirements for time dimensions are described below.
Time dimensions
A time dimension is a particular type of dimension that contains date values. You can use time dimensions to analyze your data by year, quarter, month, or day.
This section provides guidance on valid field names and data values when using time dimensions with NLG Apps and Arria Answers.
Note
The Arria visualization categorizes MicroStrategy date and time attributes as time dimensions.
Tip
When Arria for MicroStrategy identifies an attribute as a time dimension, the Entity Type field is automatically set to DateTime
. If necessary, you can set the entity type in the NLG Apps wizard or the Arria Answers wizard.
There are two ways to store dates in your raw data:
Date columns
Date columns in your raw data can be used in two ways: as a single date field, or as a MicroStrategy time hierarchy.
Single date field
MicroStrategy creates date attributes from the date columns in your raw data — for example, see the Date attribute outlined in blue, below.
Supported column/attribute names
A single column/attribute containing date values must be named as follows:
Naming Rule | Example Column/Attribute names |
---|---|
*date* |
|
The asterisks (*) are wildcards that represent one or more spaces, hyphens, or underscores. These rules are case-insensitive.
Tip
You can use the Alias field in the NLG Apps wizard and the Arria Answers wizard to override date column/attribute names and comply with the naming rules.
Supported date formats
The following date formats are supported:
Pattern | Example Values |
---|---|
|
|
|
|
|
|
|
|
If your Date field is not in a supported format, do the following:
In MicroStrategy, go to the Datasets panel.
Right-click your Date attribute, go to Data Type, and select the Date option from the dropdown field.
Click OK. A new date attribute is created (Date 1).
Right-click the new date attribute, go to Number Format, select Custom from the dropdown field, and enter
dd/mm/yyyy
(or another supported format) in the last, blank field.Click OK. Now use the new date attribute with the Arria for MicroStrategy visualization.
MicroStrategy time hierarchy
You can create separate time attributes (outlined in red, below) from a date attribute.
To create time attributes, right-click the date attribute, click Create Time Attributes, and select the attributes you want from the list.
Important
Only the Date (Month), Date (Quarter), and Date (Year) time attributes are supported as time dimensions in NLG Apps and Arria Answers. Using any other MicroStrategy time attributes may result in inaccurate narratives or error messages.
To query your data for a specific day in Arria Answers — e.g. What were my Sales on 5th August? — you must use a single date field or upload a dataset that separates date components into multiple columns.
Supported column/attribute names
The standard MicroStrategy names for time attributes are supported: Date (Month), Date (Quarter) and Date (Year).
Date components across multiple columns
An alternative to a single date column is to spread your date components (year, quarter, month, day) across multiple columns in your raw data.
MicroStrategy creates a date attribute for each of these columns (outlined in blue, below).
NLG Apps and Arria Answers use the following date components:
Years
Supported column/attribute names
A single column/attribute containing year values must be named as follows:
Naming Rule | Example Column/Attribute Names |
---|---|
y |
|
*yr* |
|
*year* |
|
The asterisks (*) are wildcards that represent one or more spaces, hyphens, or underscores. These rules are case-insensitive.
Tip
You can use the Alias field in the NLG Apps wizard and the Arria Answers wizard to override date column/attribute names and comply with the naming rules.
Supported values
A year value must be a two-digit or four-digit number (for example, "22" or "2022").
Quarters
Supported column/attribute names
A single column/attribute containing quarter values must be named as follows:
Naming Rule | Example Column/Attribute Names |
---|---|
q |
|
*qt* |
|
*qtr* |
|
*quarter* |
|
The asterisks (*) are wildcards that represent one or more spaces, hyphens, or underscores. These rules are case-insensitive.
Tip
You can use the Alias field in the NLG Apps wizard and the Arria Answers wizard to override date column/attribute names and comply with the naming rules.
Supported values
A quarter value can be given in alphanumeric or numeric form:
Quarter | Example Alphanumeric Values† | Example Numeric Values |
---|---|---|
Quarter 1 |
|
|
Quarter 2 |
|
|
Quarter 3 |
|
|
Quarter 4 |
|
|
† Any combination of the strings "Q", "Qt", "Qtr", and "Quarter" plus a number, with or without spaces, is acceptable for alphanumeric values. Therefore, "Q4", "Q 4", and "4Q" are equally valid. Also, any mixture of cases is acceptable. Therefore, "QUARTER 1" and "qUARTER 1" (to give two alternatives) are valid alternatives to "Quarter 1".
Months
Supported column/attribute names
A single column/attribute containing month values must be named as follows:
Naming Rule | Example Column/Attribute Names |
---|---|
m |
|
*mon* |
|
*mth* |
|
*month* |
|
The asterisks (*) are wildcards that represent one or more spaces, hyphens, or underscores. These rules are case-insensitive.
Tip
You can use the Alias field in the NLG Apps wizard and the Arria Answers wizard to override date column/attribute names and comply with the naming rules.
Supported values
A month value can be given in text or numeric form:
Month | Example Text Values† | Example Numeric Values |
---|---|---|
January |
|
|
February |
|
|
March |
|
|
April |
|
|
May |
|
|
June |
|
|
July |
|
|
August |
|
|
September |
|
|
October |
|
|
November |
|
|
December |
|
|
† This requirement is case-insensitive, so "JAN", "JAn" and "jan" are valid alternatives to "Jan".
Days
Supported column/attribute names
A single column/attribute containing day values must be named as follows:
Naming Rule | Example Column/Attribute Names |
---|---|
d |
|
*day* |
|
The asterisks (*) are wildcards that represent one or more spaces, hyphens, or underscores. These rules are case-insensitive.
Tip
You can use the Alias field in the NLG Apps wizard and the Arria Answers wizard to override date column/attribute names and comply with the naming rules.
Supported values
A day value must be a one-digit or two-digit number (e.g. 5
or 05
). Ordinal numbers (e.g. 5th
) are invalid.