Cascading Parameterizing

Unknown macro: {scrollbar}

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

  1. 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]
    
  2. 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.

  3. From the Data Explorer pane right-click on the Report Parameters element.
  4. Create a new Cascading Parameter 
  5. Enter Channel Salespeople (Vendedores Del Canal) as Parameter name 
  6. Select Multiple Data Set
    One Data Set will be used for each step of the parameter ( Data Sets were created before)
  7. Press the Add button to add a parameter to the cascade.
  8. Enter the following parameters for the first Parameter:  

    Name:

    Channel

    Data Set:

    Channels

    Value:

    unique_name

    Display Text:

    label

  9. Press the Add button to add a second parameter to the cascade.
  10. Enter the following data for the second Parameter.  

    Name:

    ChannelSalesperson (VendedorDelCanal)

    Data Set:

    ChannelSalespeople (VendedoresDelCanal)

    Value:

    unique_name

    Display Text:

    label

  11. The cascading parameter editor should look as shown below.
  12. 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. 

  1. Edit the Data Set ChannelSalespeople (VendedoresDelCanal)
  2. 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.


Unknown macro: {scrollbar}