Driving Grids from an Excel Range

Revision as of 10:31, 30 September 2010 by Antonio.remedios (talk | contribs) (Further Exercises)

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.

  1. 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.
  2. In cells B3 to B5, we enter the years we want to analyse:
  3. 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:
  4. 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
  5. 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:
  6. As you can see, the validation list range can be hidden to keep the report tidy.
  7. Even after drilling the Grid, the driving cell is still maintained:

Further Exercises

  • 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