Variable Lists

Variable lists are a specialized type of logic that can be used in your report to change or swap out the list of elements used in the query using a simple switch. For example, you may want to swap out the list of countries used in your query from the "top 10 countries based on sales" to the 'lowest performing countries based on margin" to "all countries beginning with the letter 'A'". While producing a logical listing for countries can be done in a various tools within the product, Variable Lists offers the user the ability to flip from one to the other easily.

There are three main techniques for building Variable lists:

This topic covers the Variable Lists Wizard.

Variable Lists Wizard Dialog

The Variable Lists wizard enables users to easily create variable lists in Discover, and then inject the relevant list into the query at runtime. Each variable list is based on a static parameter - this can be an existing static parameter, or you can configure a new one directly within the wizard. Each value of the parameter is then connected to a custom list, and a dynamic slicer is produced when used.

  • For each report, you can create one or more variable lists
  • To build a variable set, you can reference an existing numeric parameter, or you can define a new one
  • Each variable set is based on one numeric parameter
  • The elements added to each custom list may be selected from a flat hierarchy, a level of a user hierarchy, or an existing custom list
  • Users can also build Quick Variable Lists - click here for details

Building a Variable List

Click the Variable List button in the Query ribbon to open the wizard.

In the dialog, start by naming the variable list, and then select a variable from the content folder tree. You can select either a static parameter, or a discrete list text parameter. Select the parameter from the folder tree under choose variable. The parameter values will appear in the second column.

Alternatively, you can create a quick parameter on the fly. See below for more.

Under Select Hierarchy, choose the hierarchy you want to base the variable list on, and choose the selection type from the drop-down in the Members Selection panel:

  • Free Selection: use the option to select the members from within the hierarchy.
  • Level: use this option when working with user hierarchies, in order to select a specific level of the hierarchy.
  • Sets: use this option to select an existing custom list (set).

For each parameter value, select the label from the Select Item panel, and then select relevant member(s) from the Members Selection panel. Each parameter value must be based on the same hierarchy.

When ready, click Apply. The variable list will be automatically added to the current query, and will be appear under the Elements panel.

Add a quick parameter

If you don't have a parameter variable defined, you can add a new quick parameter on the fly. To add a new variable, rather than selecting an existing one, click the plus sign under Choose Variable (green arrow).

You will be prompted to create a static parameter. Start by naming the parameter, select the slicer type, and then enter the required captions (these will be the names of the slices in the variable set - they can be numeric or nominal). Each value must be separated by a comma. When ready, click OK - you will be prompted to save the parameter.

Select the new parameter from the folder tree under choose variable. The parameter values will appear in the second column.

Save and Edit a Variable List

To save your Variable List to the Content System, right click on it and select Make sharable (you can delete it later by right clicking and selecting Delete).

You can also open the list for editing in Formulate and edit it, or use it to create a new custom list or parameter (you can Shift + select additional elements from the same hierarchy in the Elements panel).