Sections in this category

Setting Custom Filters

  • Updated

Sisu provides the ability to set nested filters when defining and iterating on your analysis or drilling down into a fact.

 

Related Articles:

 

Using Custom Filters for Defining Custom Filters

When setting filters or defining groups to compare, you can use a combination of AND and OR filters (referred to as nested filters). 

For example, the following nested filters will return sales of SKU-3009 in either the New York store or the Chicago store:

sample_nested_filters.png

 

Using Custom Filters for Defining Group Comparison

Nested filters can be particularly useful when defining groups to compare in a Group Comparison Analysis.  

For example, the following nested filters will return sales of SKU-3009 in either the New York store or the Chicago store:

compare_groups.png

 

Filtering Syntax

You can filter by:

  • a single condition
    (color = blue)
  • a set of OR conditions
    (color = blue OR color = red OR ...)
  • a set of AND conditions
    (color = blue AND color = red AND ...)
  • sets of single or OR conditions joined by ANDs
    ((color = blue OR color = red) AND (style = shirt) AND ...)
info_icon.png Within each OR or AND set there is no limit on the number of conditions.

Columns and values used in conditions are populated from the Metric's data source. Sisu users can also create a custom value.

Sisu conditions cannot currently compare against "empty value". If you would like to filter out empty values for a particular column, Sisu recommends defining a special character in your data source.

tip_icon_-_small.png Within each OR or AND set there is no limit on the number of conditions.

The following options are available:

filter_options.png

 

The “Is Like” Filter

The “is like” option is used as a WHERE clause to search for a specified pattern within a column. There are two wildcards often used in conjunction with the LIKE operator:

  •  The percent sign (%) represents zero, one, or multiple characters
  •  The underscore sign (_) represents one, single character

The following table describes in simple terms various ways you can use the % and _ characters to filter your data:

a%

Finds any values that start with "a"

%a

Finds any values that end with "a"

%or%

Finds any values that have "or" in any position

_r%

Finds any values that have "r" in the second position

a_%

Finds any values that start with "a" and are at least 2 characters in length

a__%

Finds any values that start with "a" and are at least 3 characters in length. (There are two underscores.)

a%o

Finds any values that start with "a" and ends with "o"

This type of filter is commonly used in text-based columns such as a “Comments” field from a feedback form. For example, given the following text samples:

  • I think this product is super!
  • I like the Superman character.

...using “is like” %super% will recognize both instances, since the % sign is a wildcard for any character, including a space and punctuation. However, using “is like” super (with no % or _), neither line will be recognized, since both have additional characters immediately following the target text.

 

The “Contains” Filter

A “contains” option is used only when your Fact already uses the “contains” operator, which is a result of using the Keyword Analysis feature to analyze keyword phrases. This essentially changes the “is” operator to “contains”.

For example, in the following analysis, we used Manage Columns to split the “LIST_SKU_CATEGORY” string column into keyword phrases, so the Facts describing the Granola Bar and Energy Drink categories’ sales use “contains” instead of “is”.

Contains_example.png

In this situation, when you drill down into one of these Facts, you will see that the filter operation shows “contains”:

Contains_in_filter.png

tip_icon_-_small.png Note that the “contains” operator is applied automatically and cannot be selected by you, since it is dependent on using the “split column into keyword phrases” option in Manage Columns. Refer to Transforming a Column: Keyword Analysis for more information.
info_icon.png

Note that the “contains” operator differs from “is like” because it takes into account the delimiter that surrounds the keyword output.

“Is like” is similar to the LIKE clause in SQL.

The “contains” operator checks for all combinations of the columns data. For example, given the following text samples:

  • I think this is a super product!
  • I like the Superman character.

A “contains” super filter will only recognize the first instance, but not the second.

 

Troubleshooting

warning_icon.png

If when saving a filter or group comparison, Sisu shows an "Invalid filters" error:

  • Ensure any custom created values match the data type of their column. For example, "red" is not a valid value for a column with type "boolean".
  • Ensure all filters have a value.

 

warning_icon.png

If when saving a filter or group comparison, Sisu shows an "Error occurred while saving" error:

  • Ensure you have a valid network connection and try saving again.