MicroStrategy ONE

Attribute qualification

An attribute qualification consists of an attribute (and an attribute form if necessary), a qualification operator, and the values on which the attribute is to be qualified. For more information on using attribute qualifications in custom groups, see the Custom Groups section of the MicroStrategy Developer Help (formerly the MicroStrategy Desktop Help).

You can specify the attribute with just its name if it is the only item in the project by that name. If there are two items in the project with the same name, but in different locations, Command Manager will return an ambiguity error message. To correct this error, specify the full path to the attribute and enclose it in brackets [ ], such as [\Schema Objects\Attributes\Time\Year].

To specify an attribute form, use the syntax AttributeName@FormName, or [Path\AttributeName]@FormName if you need to specify the full path to the attribute.

If you do not specify an attribute form, you are qualifying on a list of elements from the attribute, generated by an element prompt. In this case you must use the IN (list) or NOT IN (list) qualification operators, and specify an element prompt as the list. The syntax for this is AttributeName IN ?ElementPromptName, or [Path\AttributeName] IN ?ElementPromptName if you need to specify the full path to the attribute.

The qualification operators include:

  • IN and [NOT IN]. These operators require a list of values, in parentheses.

    If you do not specify an attribute form for the IN or [NOT IN] operator, you must specify an element prompt, preceded by a question mark, such as ?ChooseRegion .

  • Standard comparison operators such as < or =. These operators require a single value, which must be a number.

  • LIKE and [NOT LIKE]. These operators require a single value, which must be a string.

  • BETWEEN and [NOT BETWEEN]. These operators require two values separated by AND.

The NOT IN, NOT LIKE, and NOT BETWEEN qualification operators must be enclosed in square brackets [ ].

Values can be one of these options:

  • Numbers can be either integers or real numbers. If you are using real numbers, you must use the decimal separator specified in your Regional Settings.
  • Strings must be enclosed in double quotes (" "). Strings may contain single quotes (apostrophes) but not double quotes.
  • Dates must be formatted according to your regional settings, and enclosed in single quotes (' ').

Examples

Copy
[\Schema Objects\Attributes\Products\Category]@DESC 
 IN ("Books","Movies")
Copy
[\Schema Objects\Attributes\Time\Year]@ID > 2003
Copy
Customer Age@ID BETWEEN 20 AND 40