MicroStrategy ONE

Importing and Exporting Elements for Attribute Qualifications

You can import filter elements into the Filter Editor from sources other than MicroStrategy. The following requirements must be met:

  • The filter is an attribute qualification.
  • The filter is qualified on an attribute form, not elements.
  • The operator must be In list or Not in list.
  • The elements to be imported are stored in an Excel file or a text file.

The import filter elements option adds more flexibility to the Filter Editor by allowing lists of data from pre-existing files to be imported into the filter definition. Existing filter definitions can also be exported to a file.

You can use a prompt to allow you to select the file to import when you run the report.

Importing elements from a text file or a Microsoft Excel file can be quicker and more efficient than selecting each individual element to be included in the filter. For example, you have an Excel spreadsheet that lists the products on sale this month. You need to review last week's revenue for just these items. Rather than selecting them in the Filter Editor, you can simply import the file. Likewise, you can export existing filter definitions to a file.

Requirements for Formatting the Import File

The following rules apply to the formatting of files:

  • Excel: Data can be stored in rows, columns, or both, as follows:
    • If the data in a cell has double quotes in the first and last position, it is imported as it is, with the quotes.
    • If the data in a cell has single quotes in the first and last position, it is imported as is, with the quotes.
    • If the data in a cell does not satisfy conditions 1 or 2, it is checked to see if it is a number. If the data is a number, it is imported as it is.
    • If the data in a cell does not satisfy conditions 1 or 2, it is checked to see if it is a date. If it is a date, it is imported by adding single quotes at the beginning and at the end to comply with the date format.
    • If the data in a cell does not satisfy any of the above conditions, it is considered as text data and is imported by adding double quotes at the beginning and end to comply with the text format.
  • Text—Data in a text file must be one of the following:
    • Tab-delimited
    • List-delimited as specified in the regional settings
    • Return-delimited

To Import Filter Elements

  1. In MicroStrategy Developer, choose File > New > Filter.

    If the New Filter dialog box is displayed, click the Empty Filter icon. If you do not want this dialog box to be shown in the future, select Don't show this dialog in the future. Click OK. For a full description of object templates, including a list of the objects that can use object templates, see Re-Using Objects Via Shortcuts and Object Templates .

  2. Double-click in the Filter definition pane.
  3. Select Add an Attribute qualification and click OK.
  4. Select an attribute by dragging the attribute from the Object Browser into the Attribute box.
  5. Select any form, except Elements, from the Qualify On drop-down list.
  6. Select In list or Not in list from the Operator drop-down list.
  7. Click Import.
  8. Select the Excel file or text file that contains the attribute elements.
  9. Click OK.
  10. Save and close the filter.

To Export Filter Elements

  1. In MicroStrategy Developer, choose File > New > Filter.

    If the New Filter dialog box is displayed, click the Empty Filter icon. If you do not want this dialog box to be shown in the future, select Don't show this dialog in the future. Click OK. For a full description of object templates, including a list of the objects that can use object templates, see Re-Using Objects Via Shortcuts and Object Templates .

  2. Double-click in the Filter definition pane.
  3. Select Add an Attribute qualification and click OK.
  4. Select an attribute by dragging the attribute from the Object Browser into the Attribute box.
  5. Select any form, except Elements, from the Qualify On drop-down list.
  6. Select In list or Not in list from the Operator drop-down list.
  7. In the List field, enter the element IDs, descriptions, or other items, separated by a comma, as shown in the example below:

    Central,Mid-Atlantic,Northeast

    You can drag and drop elements from the Object Browser, but you must type a comma between each item. If you drag and drop elements, they are enclosed in double quotes. If you export to an Excel spreadsheet, the quotes are not exported, but if you export to a text file instead, the quotes are exported.

  8. Click Export.
  9. Navigate to the directory in which to save the file.
  10. Enter a File Name.
  11. By default, the file is saved as an Excel spreadsheet. To change it to a text file, select Text Files from the Save as type drop-down list.
  12. Click Save.
  13. Click OK.
  14. Save and close the filter.