Help IndexTable of Contents

Examples of Variables

This page provides two examples for the usage of variables:

Example of Top Count Filter with Variable

STEP 1: Filter Rows

Click the Filter Rows icon in the Data Discovery/Query ribbon to open the Filter Rows dialog. Then do the following:

  • Select the Top Count function to activate the Top list.
  • Click the purple icon to display the Top list.
  • In the Top list, select New Variable to open the Variables dialog.

STEP 2: Define Variable

Use the Variables dialog to create a slider variable named "Demo", as shown below. Then click Save to save the variable and return to the Filter Rows dialog. (Note that clicking Close will close the dialog without saving the variable.)

STEP 3: Apply Filter

Click Apply in the bottom of the Filter Rows dialog to apply the row filter using the "Demo" variable.

The Demo variable appears above your grid report.

  • Drag the slider to change the variable's value.
  • Once the mouse focus is on the slider, you can also use the right/left arrows to change the value.
  • The "6" caption indicates that the variable currently has a value of 6.

Right click on the slider and select "Variable Options" to return to the Variables dialog and edit the variable (if needed).

Example of Calculation with Variable

This example runs a calculation that includes a variable set of elements within a custom measure.

STEP 1: Custom Element

Right-click on a custom element and select the following command sequence:

  • Custom Elements/Member Calculations/Default Custom Measure


STEP 2: Custom  Member Dialog

Define a custom member as follows:

  • Click "Show Advanced" to expand the dialog.
  • Click "Hierarchies, Elements, Functions and Variable Trees" to open the selection tables.
  • Drag the "Demo" variable into the text box to include it in the MDX expression.

STEP 3 : Test MDX

Click Test MDX to verify the syntax.

STEP 4: Create Custom Member

Click Create to generate the custom member.

When you access the custom member in the element hierarchy, the variable will appear within the report workspace. Changing the variable's value in the workspace affects the custom member and the data.


Home | Table of Contents | Index | User Community
Pyramid Analytics © 2011-2018