Variable list example

This example uses the Analysis cube of the Samples application. It enables you to swap the dimensions which form the X and Y axes of a report by changing the value of two variables.

  1. Create two global variables named XAxis and YAxis. Set their values to [Product] and [Period] respectively.
  2. Create server lists for the Product and Period dimensions.
  3. Select the Period list and open the Advanced pane of the List Designer. In the General section, click Period in the Dimension field and select <Edit Formula> from the selection list.
  4. In the Edit Formula dialog, double-click YAxis in the list of global variables and click OK.
  5. Click Period in the Hierarchy field and select YAxis in the Edit Formula dialog.
    The Period list moves to the Variable Lists folder in the Database Structure.
  6. Follow the same procedure with the Product list, but select XAxis instead of YAxis as the variable.
    The Product list moves to the Variable Lists folder in the Database Structure.
  7. Create a new report and drag the Period list to cell B4 and create a vertical hyperblock.
  8. Drag the Product list to cell C3 to create a nested horizontal hyperblock.
    In View Mode, the Product and Period lists form the X and Y axes of the report.
  9. In the Accessories pane, change the value of the XAxis variable to [Period] and the YAxis to [Product].
    In View Mode, the Period list now forms the X axis and the Product list the Y axis.