Search code examples
spotfire

Populate Dropdown from filtered data in Spotfire


I have a data set that contains a number of groups and each group has a number of individuals.

I have a tab in a report which shows some statistics for all the groups as a whole.

I have another tab which has a filter to only show info for selected groups in that tab.

I have a third tab, which I want to show info for individuals within whatever group is selected on the second tab.

I have 2 filters setup for these, a 'group' filter and an 'individual' filter so that I can easily add the filter to any visualizations.

I am trying to only show individuals within a group selected on the second tab ('group' filter) on the filter in the third tab ('individual' filter) however this will only happen when I set that filter to the 'group' filter'. This would be OK except when I go back to tab 2 to change the group (and thus the available individuals on the third tab) I only have one group available in this filter IF I have selected an individual on the third tab.

Is there any way to do the following:

  1. Only show individuals based on 'group' filter in the filter on the third tab, which will effect the 'individual' filter. All groups should be available in the groups filter independent of the individual selection on third tab

Solution

  • No, not with using standard filters. The fact that you have these broken up across tabs doesn't change the fact. When you apply a filter, you are filtering the underlying data-set as whole. Thus, when you select an individual selection on the third tab, it is filtering the underlying data table which feeds all three tabs to this level.

    What you can do, is add in an Action Control that will only refresh / remove the filters applied on a certain tab. This will be similar to clicking the Reset All Filters button on the tool bar, except we can apply this to your specific page.... in this case the third tab.

    In a text area on the second tab

    • Right Click > Edit Text Area > Insert Action Control
    • Set the Display text to what ever you want
    • Control type: Button or Image... perhaps something like this
    • Available actions > Pages and visualizations: Navigate to the third tab page name and click Add
    • Available actions > Functions: Navigate to Reset All Filters and click Add
    • Additionally, you may want to add Unmark Marked Rows as well

    NOTE: This should be done IN THIS ORDER

    Now, when you navigate back to the second tab, you can click this button / image you have inserted to remove the filters applied on the third tab without removing those applied in the first tab.

    Another way would be some IronPython... but I'm not going to serve that up since it's even more complicated.

    Also, I would look into Filtering Schemes. It doesn't help this question much, since you are creating cascading filters, but I think you'll find it powerful in future analytic designs.

    ActionControl