MicroStrategy ONE

Configuring how logical operators are displayed

Before you begin

This topic assumes that you are familiar with filters, especially the different types of filters and the components of filters. For background information, see Filters.

Auto text codes are document or dataset variable information. The filter details auto text code displays the report filter and report limit of the specified dataset report by default, although other types of filters can be displayed. For more information on displaying other types, see Configuring the content of the filter details auto text code.

Filters can have multiple qualifications, which are the conditions (such as Revenue > 6,000,000) that the data must meet to be included in a report. A dataset report can also contain multiple filters in its report filter. For example, the report filter of a dataset report contains two filters, East Coast Regions and Revenue > $6M. The filters are joined by a logical operator, which is AND in this case.

Use the following settings to configure how to display the logical operators that join multiple conditions:

  • New line between conditions: Determines whether or not each condition is placed on a separate line. You can also select Automatic, which inserts a line only when conditions are joined by different logical operators.

    For example, a report is filtered for revenue greater than 10 million and profit greater than 2 million and the Mid-Atlantic region. A second report uses the same filter conditions, except the second logical operator is replaced by or, which filters the report for revenue greater than 10 million and either profit greater than 2 million or the Mid-Atlantic region. The two reports are used in a document. A filter details auto text code is displayed for each dataset report; both use the Automatic option for Carriage returns between conditions. In the filter details auto text code for the report with all ANDs, the text wraps within the text field. In the other filter details, a new line is started at the logical operator AND, and again before the Profit condition. Using the new lines helps to distinguish between the conditions, as shown below.

    • (Revenue > 10,000,000) AND (Profit > 2,000,000) AND (Region = Mid-Atlantic)

    • (Revenue > 10,000,000)

    • AND

    • (Profit > 2,000,000) OR (Region = Mid-Atlantic)

  • Parentheses around conditions: Determines whether or not parentheses are placed around each condition, such as (Region = Northeast). If a new line is inserted between conditions, you can often omit the parentheses since the conditions are already differentiated from each other.

    • You can also select Automatic, which displays parentheses only when they resolve ambiguity in the expression. Parentheses are not included around conditions that are joined by the same logical operator. When conditions are joined by different operators, the parentheses are necessary to ensure that the conditions are grouped correctly.

    • For example, continue with the document used in the previous example, except that the filter details auto text codes both use the Automatic option for parentheses. Parentheses are displayed only in the filter that needs them, to ensure that any ambiguity about the order is resolved.

    • Revenue > 10,000,000 AND Profit > 2,000,000 AND Region = Mid-Atlantic

    • Revenue > 10,000,000 AND (Profit > 2,000,000 OR Region = Mid-Atlantic)

  • Logical operator between conditions: Specifies whether or not to display the logical operator between conditions. The options are:

  • Yes to display all operators

  • No to omit all operators

  • AND only

  • OR only

    • This filter details auto text code displays all the logical operators:

    • (Revenue > 10,000,000) AND ((Profit > 2,000,000) OR (Region = Mid-Atlantic))

    • The same filter details auto text code set to AND only; notice that the OR before the Region condition is replaced by a comma:

    • (Revenue > 10,000,000) AND ((Profit > 2,000,000),(Region = Mid-Atlantic))

For each property, you can choose to inherit the setting instead. If you are configuring the auto text codes in a specific text field, the setting is inherited from the document setting. If you are configuring all the auto text codes in the document, the setting is inherited from the report setting. For more information on the levels of inheritance, see Levels of auto text code configuration.

Related Topics