Types of prompts - Microstrategy

Using the following prompt types, you can create a prompt for nearly every part of a report. It is important to remember that prompts can be used in many objects including reports, filters, metrics, and custom groups. All of these prompts will reveal themselves at report execution time, but the origin of the prompt can be within any of the objects.

  • Filter definition prompt encompasses four different prompt types, all of which allow the user to define the filtering criteria: attributes in a hierarchy, attribute forms, attribute element lists, and metrics.
  • Object prompt allows you to select which MicroStrategy objects to include in a report, such as attributes, metrics, custom groups and so on. Object prompts can either determine the definition of the report template or the report filter.
  • Value prompt allows you to select a single value such as a date, a specific number, or a specific text string. The value chosen by the user is compared to metric or attribute element values, and thus determines the data viewed by the user.
  • Level prompt allows you to specify the level of calculation for a metric.

Filter definition prompts

These prompts are used for qualifying on the value of attribute elements and metrics. The filters affected by these types of prompts can be in the report, in a filter (which in turn may be used in the conditionality of a metric in the report), or in an element of a custom group.

Choose from all attributes in a hierarchy

This type of prompt is used to qualify on one or more attributes in one or more hierarchies. You are presented with at least one hierarchy and all of the attributes included in that hierarchy. You can qualify on one or more of those attributes by choosing an element list or by qualifying on a particular attribute form. The choices made are included in the filtering criteria in the report.

To define this type of prompt, you can do one of the following:

  • Choose a particular hierarchy.
  • Use the set of hierarchies resulting from a search for hierarchies.
  • List all hierarchies available in the project.

If you choose to display more than one hierarchy, you can make qualifications from all hierarchies presented at report run time.

Qualify on an attribute

This is used to apply conditions or qualifications to an attribute form.

The user is presented with one or more attributes and may qualify on an element list or an attribute form of one of them.

To define an attribute qualification prompt, you can either

  • choose a particular attribute
  • present the user with a partial or complete list of attributes that are the result of a search for attributes available in the project

Choose from an attribute element list

This option is used to allow the user to choose from a list of attribute elements to be included in a filter or custom group. This list may be restricted, at prompt design time. This type of prompt can be used with any attribute in a project.

The list of elements from which the user may choose can be implemented by

  • selecting all elements associated with an attribute
  • providing a partial list of elements by applying a filter on all of the elements associated with an attribute
  • providing a predefined list of elements from which the user can choose

Qualify on a metric

A metric qualification prompt allows a user to qualify on a metric. The user is presented with one or metrics, and may choose one on which to qualify.

The choice of metrics can be defined by

  • specifying a single metric for run-time use
  • specifying a search object to restrict the list of metrics from which the user can choose

Example: filter definition prompt

Report requirement

You need to create a report showing sales in the West, Central, and Eastern Regions. All other data on the report remains the same. You do not necessarily want the regions on the same report.

Solution

To meet this requirement, the easiest solution is to create a report that includes a filter prompting the user on region. When the report is executed, the prompt dialog opens, asking the user to choose the region(s) for which to return the report results.

Object prompts

Object prompts are used to allow you to choose what objects will be included in the report filter or on the report template.

These are defined by specifying either a search object or a predefined list of objects from which the user can choose. An object prompt allows specification of default answers as well as maximum and minimum number of objects to be selected.

A search object defines the criteria (such as location, date, owner, and so on) for a list of objects to be generated. Searches defined in prompts are saved in the project. For example, a search object can display all metrics that are contained in a certain folder and use a particular fact.

All objects returned by a single object prompt must be of the same object type. For example, you can use a prompt to ask for metrics or attributes, but not for both. If you want to prompt for multiple object types in the same report, you may create an object prompt for each object type.

Example: object prompt

Report requirement

Create a report displaying item sales. At runtime, the user can select whether to calculate sales at the Category or the Subcategory level.

Solution

Create an object prompt with Category and Subcategory. Create the Sales metric, using the object prompt as the target of the level (dimensionality). When the report is executed, the user is prompted to select either Category or Subcategory. The Sales metric is calculated accordingly.

Report requirement

The Sales Manager frequently asks her analysts to provide similar reports with minor changes to the metrics. She always wants a metric to calculate Dollar Sales for each employee. In addition, she sometimes wants to compare the results of each employee to the sales results of the best or the worst employee. Other times, she wants to compare the results of each employee to the average sales of all the employees.

Solution

Rather than create many different reports, you would like to provide the Sales Manager with the flexibility to select which analytical function she wishes at the time of running the report.

In this case you can give her three functions to choose from:

  • minimum
  • maximum
  • average

She will select which function to use with the Dollar Sales metric. Your final report can then have the following objects:

  • employee
  • Dollar Sales metric
  • Dollar Sales metric that uses the analytical function selected by the user

Value prompts

Value prompts are used when the information desired at run time is a single value of a specific data type. The value chosen by the user is compared with either an attribute form or a metric. This comparison can be done in a filtering criteria or in a custom group. The different types of Value prompts are:

  • Date - prompts for a date value.
  • Numeric - prompts for a numeric value. Numeric value prompts accept integers or decimals up to 15 digits of precision.
  • Text - prompts for any type of text.
  • Big Decimal - prompts for a big decimal value. Big Decimal value prompts accept integers and decimals up to 38 digits of precision.

    Big Decimal prompts should only be used in expressions that require high precision, such as qualifying on a Big Decimal attribute ID.

  • Long - prompts for a long integer value. Long prompts accept integer numbers up to 9-10 digits.

    Although long prompts are not part of the options available by default for selection, you can enable them as part of your project preferences.

Value prompts allow specification of maximum and minimum values to be applied.

Example: value prompt

Report requirement

Create a report showing sales since a certain date.

Solution

Prompt the user for the date since they want to see sales data. The value they choose is applied to a filter criteria for the attribute “date.” The prompt here is included in the filter on a report.

Level prompts

Level prompts are used to define the dimensionality of a metric. When two or more metrics differ only in level, it is useful to create a prompt on the dimensionality to avoid having to create two or more metrics. This prompt definition type requires either a hierarchy or a list of attributes. The default output of the metric is at the report level.

Example: level prompt

Report requirement

Create a report listing items with sales calculated at either the Category or the Subcategory level. At runtime, the user must be able to select the Category or Subcategory level, as well as the filtering and grouping properties of the metric.

Solution

Create a level prompt with Category and Subcategory. Create the Sales metric, using the level prompt as the target of the level (dimensionality). When the report is executed, the user is prompted to specify the complete level of the metric, including the target, filtering, and grouping. The Sales metric is then calculated accordingly.

This example differs from the one in Example: object prompt. An object prompt allows prompting only on the target, while the level prompt allows prompting on all components of the metric—target, filtering, and grouping.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Microstrategy Topics