Last Modified Date: 22 Aug 2019
AnswerThe following instructions can be reviewed in the workbook attached below.
Step 1: Create a List Parameter
- Right-click in the Data pane and select Create Parameter.
- In the Create Parameter dialog box:
- Name the parameter. In the example workbook, the parameter is named Show Sales By.
- For Data Type, select String.
- For Allowable Values, select List.
- Click Add List values from Fields and select fields as appropriate. In the example workbook, Category and Sub-Category are used.
- Click OK.
Part 2: Create a Calculated FieldThis calculated field will validate that the parameter value matches one of the values in either Category or Sub-Category.
- Select Analysis > Create Calculated Field.
- In the Calculated Field dialog box:
- Name the calculated field. In the example workbook, the calculated field is named Validate
- In the Formula field, create a calculated field similar to the following:
[Show Sales By]=[Category] OR [Show Sales By]=[Sub-Category]
Part 3: Build the View
- Drag the calculated field from Step 2 to the Filters shelf.
- In the Filter dialog box, select True, and then click OK.
- In the Parameters pane, right-click the parameter from Step 1 and select Show Parameter Control.
- Drag the parameter to the Rows shelf.
- Drag the field that contains the values used in the parameter to the Text card.
Additional InformationThis technique is similar in concept to the related article Filtering Multiple Dimensions Using Parameters, however the related article is specific to creating a single text box/wildcard filter.
Discuss this article...
Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Training and Tutorials