Hierarchical Interactive Filtering in a Data Configuration

Hierarchical Interactive Filtering in a Data Configuration

book

Article ID: KB0083427

calendar_today

Updated On:

Products Versions
Spotfire Statistica 13.3,13.2,13.1,13.0,12.7

Description

Description: How to implement interactive filtering in a data configuration for two fields.

Issue/Introduction

Hierarchical Interactive Filtering in a Data Configuration

Resolution

In this example the two fields are Gender and HairColor.
 
Set the usual interactive filtering settings, giving Gender sequence number = 1 and  select the SQL operator as "Equal"Example1

 
And HairColor sequence number = 2: Example2
 
So when the data configuration is exported, or any analysis configurations based on this data configuration is run, a prompt to pick a Gender value then HairColor appears.
 
The preference when prompted for a hair color value in this example is that only a list of hair colors that are valid for the gender value may be selected. To make that happen, specify a SQL statement in the HairColor Filter Options node. Let’s see how to do that using the SQL Wizard.
 
1. Click the SQL Wizard button under the SQL Statement box: Example3
 
 
 
2. Now select the HairColor field from the Characteristics table, because we want to display a list of HairColor values from which the user can choose during interactive filtering.Example4
 
 
 
 
Also notice the Criteria folder in the bottom-right pane. Right-click in that pane and select Add:Example5
 
 
 
3. The Add Criteria dialog will appear:Example6
 
 
 
4. Select Field = Gender. Then, in the Value drop-down box, select [Gender]. Then click the Add button, and then the Close button. Note: the selected operator here for Gender in the SQL criteria statement must match the SQL Operator specified when enabling Gender Filtering options. For this example, both are set to use "Equal to".
Example7
 
 
 
Now we have the criteria logic that will return only the HairColor values that are valid for the selected Gender value.
 
Click the green run icon at the top to generate the SQL code.
 
Finally, you must manually add the “DISTINCT” key word to the SQL code, so that only the unique HairColor values are displayed during interactive filtering: Example8
When the data configuration is explored, the user will be prompted to select a Gender value. Then, when the user is prompted to select a HairColor value, the only HairColor values listed will be those that are valid for the selected Gender value.
 
 
 
 
 
 

Additional Information

Legacy Article ID: 126728