Driving Grids from an Excel Range
For many standard reports, you will want to use data from the Excel workbook to influence your Grids. Driving dimensions from a range provides a simple way to do this, especially when multiple Grids need to use the same parameters.
If the input to the Grid can contain members that aren't found in the Cube, then the error message that is shown for invalid members can be hidden. See the Grid Properties Display error on invalid members option.
Example (based on the Bicycle Sales cube)
We will create a dropdown to automatically switch the Time dimension of our Grid.
- Insert a Grid based on the Bicycle Sales demo cube, starting from A7. Select Time and Measures on Slicers, Region on Columns and Product on Rows.
- In cells B3 to B5, we enter the years we want to analyse:
- To create a validation dropdown cell:
- Select the B2 cell for the dropdown
- Select the Data Validation ribbon item:
- Choose a List type validation, and enter as the source:
- Click OK, and the dropdown will be created in cell B2:
- Now we need to drive the Grid from the dropdown cell:
- Double-click on the Time label to display the Hierarchy editor.
- Click on the Excel Range button, and choose B2 for the driving range:
- The selected range is added to the list of selections:
- Click OK
- The Grid will update to use the new range for the Time hierarchy. Because the range is currently empty, the Grid seems to be unaffected, but if we now use the dropdown to switch the year to 2003, we'll see the Grid update:
- As you can see, the validation list range can be hidden to keep the report tidy.
- Even after drilling the Grid, the driving cell is still maintained:
- Drive a second hierarchy – perhaps the Product hierarchy
- Drive a second Grid from the same cell, and watch as both Grids change at once
- Drive the Grid from formulae