Variable list example
This example uses the Analysis cube. It enables you to swap the dimensions which form the X and Y axes of a report by changing the value of two variables.
- Create two global variables named XAxis and YAxis. Set their values to [Product] and [Period] respectively.
- Create server lists for the Product and Period dimensions.
- 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.
- In the Edit Formula dialog, double-click YAxis in the list of global variables and click OK.
-
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.
-
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.
- Create a new report and drag the Period list to cell B4 and create a vertical hyperblock.
-
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.
-
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.