Accessing the option selected in a filter

Lets consider that you have created a Region filter by using a column ‘Region’ in your data and basis different regions selected you want to perform specific analysis or maybe add some exception for a specific region.

In order to do this you will have to store the option selected in the filter in a variable, for which you need to follow these steps:

  1. Create a variable by you desired name, say selected_region

  2. Assign this formula to it,
    For Single Selection:
    ValueFromIndex(Unique('Region), 1)

    For Multiple Selection:
    Unique('Region')

    Please note that the ‘Region’ column used in these formulas is from the same data using which you have created the Region filter.

  3. Further, apply the Region filter which you have created on this variable

Now, the selected region value is available in the selected_region variable

How it works:

The Unique data function gets you a list of all the unique entries present in a column.

In this case, since we have applied the Region filter as well, only the region/regions which are selected in the filter are present in the data.

Thereby, when Unique data function is applied on the Region column, you get a list of only the region/regions which are selected.

The reason for applying ValueFromIndex data function in case of single select is to pick the single value which is present in the list.