What is a Parameter?
A parameter is a string of characters that is replaced at run time with a defined value. Parameters are used as placeholders. There are two main types of parameters used in DiveTab: column-set or expand-set parameters, and data page parameters.
Column and Expand Set Parameters
Column set or expand set parameters identify the placeholder value with the take-parameter tag and the replacement value with the pass-parameter tag. This allows for a column-set or expand-set to be used multiple times with different summary columns.
The take-parameter tag is used in the column-set or expand-set in the definitions block of a data-area. When the column-set or expand-set is referenced in the data page, the pass-parameter tag identifies the placeholder value and the replacement value.
Here is an example of a report page using an expand-set parameter, with the columns expanded.
Here is the report page in the code, using the parameter reference $(<parameter name>).
Notice how Cases replaces $(
The pass-parameter tag can be used multiple times with any available summary. For example, you can use the same column-set a second time with summary Cost.
CAUTION: If you use the time series as part of the column-set, verify that the summary you use is included in the time series.
Page Parameters
Page parameters identify which values are accepted by a target page. All dimensions are passed from a parent data page to a child data page, but only specified dimensions and values are accepted by the child page.
A link on the parent page identifies the dimension and dimension value that is passed. The target page parameter identifies which dimension, and therefore the dimension value, is accepted. The parameter appears as a QuickView on the target page with the dimension and dimension value, which allows you to change values on the target page.
The parameter tag is primarily used to identify the accepted dimensions for a target page. In addition to the basic page parameter, there are four page parameter types:
- Anchor Date Parameters—Identifies an anchor date that is shown and changed using a QuickView. Those changes are accepted by the target page as a parameter.
- Conditionalized Link Parameters—Identifies specific dimension values that meet certain conditions to have active links. Values that do not meet the conditions do not have active links and are therefore not passed to the target page.
- Dimension Value Parameters—Identifies a dimension and dimension value, not visible in the page or related to the link, to pass to the target page.
- Parameter List Parameters—Identifies a metrics, or column, that is used in a data page and can be changed using a QuickView. Those changes are accepted by the target page as a parameter.
IMPORTANT: QuickViews and their dimensions also need parameters identified to be accepted by the target page.
Here is an example of an ad hoc page.
Here is an example of a report page after following the link for DIAGEO.
Notice that the Cases total is the same. This is because a parameter is not in use, so the value is not accepted by the target page.
Here is how these pages appear in the code.
The following example is of the same ad hoc and report pages, but with a parameter applied.
Here is an example of the report page after following the link for DIAGEO, with a parameter in use.
Notice the QuickView for Vendor with the DIAGEO value selected. The QuickView can change the dimension value without returning to the previous page. Also notice that the Cases total for the report page matches DIAGEO's total from the ad hoc page.
Here is how these pages appear in the code.
An Anchor Date Parameter uses an Anchor Date QuickView to change the date for the data. The target page accepts the selected value.
Here is an example of a report page using an Anchor Date QuickView.
Here is an example of the same report page with the Current Date changed to 2011-03.
Notice how the values have changed.
Here is the resulting target report page after following a Cases YTD column link.
IMPORTANT: The Vendor dimension is not included as a parameter in the code, so the Vendor value is not passed to the next page.
Notice that the Current Date value is accepted from the parent page.
Here is how the pages appear in the code.
Note that the target page includes the same quickview-set as the parent page, with the QuickView dimension as a parameter.
Here is the code for the cPlan used, which defines the Anchor Date.
A Conditionalized Link Parameter uses a column with conditionalized links to link to a target page. A conditionalized link is a column value that must meet certain criteria in order to have an active link. Using a parameter means that values with active links can be accepted by the target page. Values without links cannot be accepted because they are not linked.
Here is an example of the Brand Report page with a conditionalized link column.
For the Chain Store ID, the conditionalized link requires a value for active links. Notice that values of 0 do not have links.
Here is the resulting page for value ARROWOOD.
Here is how the pages appear in the code.
A Dimension Value Parameter uses a dimension not visible on the parent page and a dimension value specified in the code as the values passed by the parent page.
NOTE: Dimension Value Parameters are typically used for central or overview pages when you are using similar links and want to pass different values.
Here is an example of a report page with a dimension value parameter.
Here is the resulting page for value Gorman, accepting the hidden parameter for Premise value ON PREMISE.
The dimension Premise value ON PREMISE is not used in the parent page, so it is applied to the link block in order for the value to pass to the target page.
Here is how the pages appear in the code.
Notice that the dimension used in the parent page is used as a parameter in the target page.
Here is the code for the cPlan in use.
A Parameterized List Parameter uses a Parameterized List QuickView to change columns on the page. The target page accepts the selected value. For example, you can change a Cases column to a Cost column using a QuickView, and this change remains on the target page.
Here is an example of a report page using a Parameterized List QuickView.
Here is an example of the same report page with the Metric value changed to Net Sales.
Notice how the column name and values changed.
Here is the resulting target report page after following a Net Sales column link.
IMPORTANT: The Product Name dimension is not included as a parameter in the code, so the Product Name value is not passed to the next page.
Notice how the Net Sales column is accepted from the parent page.
Here is how the pages appear in the code.
Note that the target page includes the same quickview-set as the parent page, with the QuickView dimension as a parameter.
Here is the code for the cPlan used, which defines the Metric and Metric Value.
See also:
Mentioned in: