Cascading Parameterizing
In many cases, when the user must choose a value for a parameter from a long list, it is convenient to approximate the search in several steps.
In the case studied in this tutorial, we have so far defined a parameter to filter the report for a given salesperson. One way to facilitate the location of the salesperson, is to catalogue him first either as Distributor or Direct Sale.
In this way we could first request the Channel and later on, choose the salesperson from the list of salespeople in that channelÂ
This section explains how to establish this dependence between parameters through Cascading Parameters. Â
Creating Cascading Parameters
Nota
Se recomienda haber leido antes la sección Simple Parameterizing
- Create a Data Set to build the list of channels.
Name:
Channels
Data Source:
O3 Local MDX
Data Set Type:
O3 Data Set
Query
SELECT {[Vendedores].[Canal].members} ON COLUMNS FROM [Vinos]
- Create a Data Set to build the list of Salespeople in each Channel.
Name:
ChannelSalespeople (VendedoresDelCanal)
Data Source:
O3 Local MDX
Data Set Type:
O3 Data Set
Query
SELECT {[Vendedores].?.children} ON COLUMNS FROM [Vinos]
The query mark will be later associated to the parameter that identifies the Channel.
Ignore any error message displayed due to not being able to solve the parameter.
- From the Data Explorer pane right-click on the Report Parameters element.
- Create a new Cascading ParameterÂ
- Enter Channel Salespeople (Vendedores Del Canal) as Parameter nameÂ
- Select Multiple Data Set
One Data Set will be used for each step of the parameter ( Data Sets were created before)
- Press the Add button to add a parameter to the cascade.
- Enter the following parameters for the first Parameter: Â
Name:
Channel
Data Set:
Channels
Value:
unique_name
Display Text:
label
- Press the Add button to add a second parameter to the cascade.
- Enter the following data for the second Parameter. Â
Name:
ChannelSalesperson (VendedorDelCanal)
Data Set:
ChannelSalespeople (VendedoresDelCanal)
Value:
unique_name
Display Text:
label
- The cascading parameter editor should look as shown below.
- To continue, press OK.
Relating Cascade ParametersÂ
So far we have defined a Cascade with 2 parameters and 2 Data Sets, one for each parameter in the cascade.Â
What is left is to relate parameters so that one acts on the other.Â
- Edit the Data Set ChannelSalespeople (VendedoresDelCanal)
- Add a parameter as shown below.
Testing what we have done so far.
To test what we have done so far create a new Data Set with the following data:
  * Name: Sales by Channel and SalespersonÂ
  * Data Source: O3 MDX View
  * Data Set Type: O3 Data Set
  * Query The following expression in MDX:
SELECT {[Vendedores].?} ON COLUMNS, {[Vinos].[Vino].members} ON ROWS FROM [Vinos] WHERE Measures.[Litros Vendidos]
Nota
In the query, there is a question mark, indicating that in this place there is a parameter.Â
Add the parameter Salesperson by Channel (Vendedor Por Canal) in the data set as indicated in Simple Parameterizing
Create a table with the information of Sales by Channel (Vents por Canal) and Salesperson (Vendedor) as explained in Designing Report Layout
Select Preview and the following screen will appear   Â
              Â
In Channel (Canal) all the channels of salespeople of the Wines (Vinos) cube will appear; choose a channel and Salesperson by Channel ( Vendedor Por Canal ) will automatically be updated.
In Salesperson by Channel all the salespeople in the selected channel will appear; select one salesperson and press OK to see the detail of the litres of wine sold by this salesperson.Â
For instance, if you choose "Direct Sale" as channel and Federico Moreira as Salesperson, the report will show:
|| Vino || Litros Vendidos ||
Cabernet Sauvignon, Merlot |
4500 |
Cabernet, Tannat, Merlot |
0 |
Chenin, Gewurzt |
2250 |
... |
... |
Ugni Blanco |
0 |
 If you wish to change the value of the parameter you will have to click on Show Report Parameters and the previous window will be opened again, where you can choose a new channel and salesperson.