The below example can be reviewed in the attached workbook State Group Exampe.twbx.
- Create a Parameter > set the Data type to String > set the List of values > Include "Group" and "UnGroup".
- Create a Calculated field to group the desired Dimensions. In this example, the calculated field is called "Group or Ungroup" and contains the below formula:
If [State]="MA" or [State]="Maine" then
If [Group or Ungroup]="Group" then "Maine Group"
Elseif [State]="MO" or [State]="Montana" then
If [Group or Ungroup]="Group" then "Montana Group"
The calculated field example groups "MA" and "Maine" into a single value of "Maine Group" and creates the value "Montana Group" in a similar manner. Changing the Parameter to "Ungroup" returns the view to the original Dimension values.
- Drage this new Calculated field to replace the original Dimension.
To create a subset of members within a field that automatically updates when new data is added, it might be best to create a set. More information about sets is available from our online Product Help: Sets.