Using Business Intelligence Dashboard Designer : Using Content Linking to Create Interactive Dashboards : Content Linking and Query Parameters
  

Content Linking and Query Parameters

Query parameters are required for content inside a dashboard panel to receive values used to filter data from a filter control. They are also required when receiving values from content in other dashboard panels that are broadcasting values associated with Content Linking. The way in which query parameters are defined is different depending on the type of content you are placing inside your dashboard panels:
If
Then
You are defining parameters in the Analysis...
See Adding Query Parameters to Analysis Reports above
You are defining parameters in an Action Sequence (.xaction)...
Consult with your Business Intelligence administrator
You are defining parameters for a chart or data table...
Use the Query Editor to define your parameterized query. See below
Note: You can link directly to a dashboard by creating a deep link. Right-click on the tab with the Console Title, and select Create Deep Link. This will provide you with a direct link to the dashboard.
Linking Charts and Data Tables
Below are general instructions for linking charts and data tables in a dashboard. This is just an example. You must adjust the instructions when working with your own data.
1. Create a simple dashboard that contains a chart and a data table. At this point, none of the content has been linked and you have a "static" dashboard.
http://infocenter.pentaho.com/help/topic/puc_user_guide/images/48_simple_dshbrd_sample.png
Notice the pie chart in the example above. You want dashboard consumers to click a slice (NA, APAC, Japan, EMEA) and have the data table on the right update with the values associated with that slice exclusively. For example, if a report consumer clicks the EMEA slice, the data table will display values associated with EMEA and nothing else. To get the correct filter display, you must first create a parameterized query that drives the content in the data table.
2. Click the Edit button to open up the Edit pane at the bottom of the screen. Within the Objects pane, select the report you want to parameterize.
Note: Parameterizing a query, as described here, allows you to pass values dynamically and update the chart based on events triggered by other elements of the dashboard such as a user selecting an item from a filter control or following links defined in content associated with another panel in the dashboard.
3. Click on the {p} button next to the Title box. The parameters will populate after the title within the Title box.
4. Click on the Parameters tab and ensure that the parameters name is linking to the correct Source.
5. Click Apply.
The new source for the parameter corresponds to the title of the dashboard panel that contains the chart as shown in the example above. This new source will now drive the display in the data table.
6. Click on the Edit button (pencil icon) to exit the edit mode. The filters will appear after the panel titles.
7. Save your dashboard. See Saving Your Dashboard, below.
When users click a pie slice or bar in a chart, the data table displays content associated with that specific pie slice or bar. The currently applied filters appear after the title.
Linking Columns in a Data Table to Content in other Dashboard Panels
The instructions that follow show you how to link a chart to a column in a data table. You must adjust the instructions when working with your own data.
1. Create a simple dashboard that contains a data table and a bar chart. At this point, none of the content has been linked and you have a "static" dashboard. 
http://infocenter.pentaho.com/help/topic/puc_user_guide/images/55_content_link_on_column.png
Notice the data table in the example above. You want dashboard consumers to click on a product in the Product Line column and have the bar chart update with information about sales by territory for that specific product line.
 
Add a parameterized condition to the query for the bar chart by specifying a parameter name in curly braces in the Value text box; then, provide a default value for that parameter in the Default text box. In the example below, a parameter called Productline with a default value of Classic Cars has been created. 

http://infocenter.pentaho.com/help/topic/puc_user_guide/images/56_content_linking_parm_query.png
2. In the Chart Designer, set the data definitions for the series, category and values columns associated with your bar chart and click OK.
Under General Settings, select the data table and click the Content Linking tab. Enable content linking on the column in your data table that will filter content in your chart. Each of the columns in a data table is able to broadcast values to other dashboard components.

http://infocenter.pentaho.com/help/topic/puc_user_guide/images/58_parm_value_for_linking_2.png
3. Under General Settings, select the chart and click the Parameters tab. Click the down arrow, in the Source text box to display another source for the parameter you created. In the example below, notice that Order Details - Product Line, (this is the name of the dashboard panel that contains the data table), can now be selected as a source for the Productline parameter.
http://infocenter.pentaho.com/help/topic/puc_user_guide/images/64_parm_new_source.png
4. Save your dashboard. See Saving Your Dashboard below.
5. In the data table, select an item in the column that has content linking enabled. The content in the chart updates in response to the item that was clicked in the data table.
In the example below, the Product Line column was enabled for content linking.
http://infocenter.pentaho.com/help/topic/puc_user_guide/images/59_completed_linked_bar_chart.png
 
Creating Content to Content Links in an Analysis Report
Below are general instructions for creating content links in an Analysis report, (inside a dashboard), that can be used to drive the parameter values of content in other dashboard panels. You must adjust the instructions when working with your own data.
1. Create a simple dashboard that contains an Analysis Report and a data table. At this point, none of the content has been linked and you have a "static" dashboard.
http://infocenter.pentaho.com/help/topic/puc_user_guide/images/65_analyzer_table_content_linking.png
In the example above, when content linking is achieved, the list of territories (APAC, EMEA, Japan, and NA) will become hyperlinks that, when clicked, will update Customer details data table. To get the correct filter display, a parameterized query that drives the content in the data table must be created.
2. Add a parameterized condition to the query for the data table by specifying a parameter name in curly braces in the Value text box; then, provide a default value for that parameter in the Default text box. In the example below, a parameter called TERRITORY with a default value of NA has been created.
Note: Parameterizing a query, as described here, allows you to pass values dynamically and update the chart based on events triggered by other elements of the dashboard such as a user selecting an item from a filter control or following links defined in content associated with another panel in the dashboard.
http://infocenter.pentaho.com/help/topic/puc_user_guide/images/49_filterparm_sample.png
Under General Settings, click the data table and examine its available parameters. In the example below, there is an available parameter called TERRITORY with a default source value of NA (North America). A drop-down arrow in the Source text box indicates that there are additional values to control the available parameter. In this example, there are no additional source values that control the TERRITORY parameter.
http://infocenter.pentaho.com/help/topic/puc_user_guide/images/66_parameter_query_on_territory.png
3. Under General Settings, select the Analysis report. Click the Content Linking tab then click the check box next to the field/column name you want enabled for content linking. Click Apply.
http://infocenter.pentaho.com/help/topic/puc_user_guide/images/68_content_linking_enabled_fields.png
In the Analysis report, the values under Territory become hyperlinks.
http://infocenter.pentaho.com/help/topic/puc_user_guide/images/69_analyzer_hyperlinks.png
4. Under General Settings, select the data table and examine its available parameters. Notice that there is a drop-down arrow in the Source text box. Click the down arrow to display and select a new source value for the available parameter. Click Apply.
5. Save your dashboard. See  Saving Your Dashboard.
In the example below, content linking was applied. When users click on a territory hyperlink in the Analysis report, the data table updates and displays Customer-related details associated with that specific territory exclusively.
http://infocenter.pentaho.com/help/topic/puc_user_guide/images/70_analyzer_table_content_linking_complete.png
 
Linking an Analysis Chart to a Report
You can create content-to-content links between an Analysis chart and any other parameterized report such as a Report Designer report, a data table, or another Analysis report.
Below are general instructions for linking an Analysis chart to a report. You must adjust the instructions when working with your own data.
1. Create a simple dashboard that contains an Analysis chart and a parameterized report. The example above displays an Analysis chart and an Analysis Report displayed as a table view. At this point, none of the content has been linked and you have a "static" dashboard.
Hypothetically, if you want users to be able to click on a bar in the bar chart and update the Analysis table view, the table must contain at least one parameter. In the example below, there are two parameters, (LINE and TERRITORY), associated with the Analysis table.
http://infocenter.pentaho.com/help/topic/puc_user_guide/images/ana_param_on_line.png
 
2. Under General Settings, select the Analysis chart. Click the Content Linking tab then click the check box (or check boxes) next to the field/column name you want enabled for content linking. Click Apply. 

http://infocenter.pentaho.com/help/topic/puc_user_guide/images/ana_chart_content_linking_sample.png
3. Under General Settings, select the Analysis Report (table view) and click the Parameters tab. Click the down arrow, in the Source text box to display another source for the parameters you created. In the example below, notice that Sales by Line, (this is the name of the dashboard panel that contains the chart), can now be selected as a source for both the TERRITORY and LINE parameters.

http://infocenter.pentaho.com/help/topic/puc_user_guide/images/ana_content_linking_selections_territory.png
4. Save your dashboard. See Saving Your Dashboard below.
 
In this example, content linking is applied when users click on a bar in the bar chart. The data table updates and displays sales details for a product line in a specific territory.
http://infocenter.pentaho.com/help/topic/puc_user_guide/images/ana_chart_content_linking_final.png
 
Linking an Action Sequence Parameter to Content in other Dashboard Panels
To complete this task you must have an action sequence (.xaction) that contains at least one parameter.
Below are general instructions for allowing an Action Sequence parameter to drive the filter associated with content in another dashboard panel. You must adjust the instructions when working with your own data.
 
1. Create a simple dashboard that contains an action sequence file and a data table. At this point, none of the content has been linked and you have a "static" dashboard. 
http://infocenter.pentaho.com/help/topic/puc_user_guide/images/74_xaction_content_linking.png
Notice the chart (action sequence file) in the example above. You want dashboard consumers to click on a territory (APAC, EMEA, etc.), bar and have the data table update with information about that territory specifically.
2. Under General Settings, select the action sequence file and click Content Linking. If parameters have been defined in the action sequence, they will appear as values to be enabled for content linking. Parameters are hard-coded in the action sequence and cannot be changed.
http://infocenter.pentaho.com/help/topic/puc_user_guide/images/75_xaction_content_linking_available_parm.png
3. Add a parameterized condition to the query for the data table by specifying a parameter name in curly braces in the Value text box; then, provide a default value for that parameter in the Default text box.
Note: Parameterizing a query, as described here, allows you to pass values dynamically and update the chart based on events triggered by other elements of the dashboard such as a user selecting an item from a filter control or following links defined in content associated with another panel in the dashboard.
Under General Settings, click the data table and examine its available parameters. In the example below, there is an available parameter called TERRITORY with a default source value of EMEA. A drop-down arrow in the Source text box indicates that there is an additional value to control the available parameter. The value comes from the parameter in the action sequence.
http://infocenter.pentaho.com/help/topic/puc_user_guide/images/76_xaction_content_linking_drop_down.png
4. Save your dashboard. See  Saving Your Dashboard below.
5. In the action sequence file click on an object such as a bar as shown in the example above. The content in the data table updates in response to the object that was clicked in the action sequence.
Controlling a Dashboard Parameter from a PRPT Hyperlink
You must have a report (.prpt) that contains a hyperlink before you can complete this task.
The instructions that follow show you how a link inside a Report Designer report (.prpt) can drive a parameter in content on another dashboard panel. You must adjust the instructions when working with your own data.
1. Create a simple dashboard that contains a .prpt report and a data table. At this point, none of the content has been linked and you have a "static" dashboard. 
http://infocenter.pentaho.com/help/topic/puc_user_guide/images/71_prpt_content_linking.png
Notice the report (.prpt) in the example above. You want dashboard consumers to click on a territory (APAC, EMEA, etc.), hyperlink and have the data table update with information about that territory specifically.
2. Under General Settings, select the report (.prpt) and click the Content Linking tab. Click the checkbox next to the field you want used for content linking.
3. Add a parameterized condition to the query for the data table by specifying a parameter name in curly braces in the Value text box; then, provide a default value for that parameter in the Default text box. In the example below, a parameter called TERRITORY with a default value of NA has been created.
http://infocenter.pentaho.com/help/topic/puc_user_guide/images/49_filterparm_sample.png
Note: Parameterizing a query, as described here, allows you to pass values dynamically and update the data table based on events triggered by other elements of the dashboard such as a user selecting an item from a filter control or following links defined in content associated with another panel in the dashboard.
4. Under General Settings, select the data table and click the Content Linking tab. Click the drop-down arrow in the Source text box, to display another source for the parameter you created. In the example below, notice that Product Line Share by Territory - Territory, (this is the name of the dashboard panel that contains the .prpt), is now selected as a source for the Territory parameter.
http://infocenter.pentaho.com/help/topic/puc_user_guide/images/72_prpt_content_linking_select_parm.png
5. Save your dashboard. See Saving Your Dashboard below.
When content linking is achieved, the data table updates when a link in the report (.prpt) is clicked as shown in the example below.
http://infocenter.pentaho.com/help/topic/puc_user_guide/images/73_prpt_content_linking_final_result.png