Equality Filter Interactions

You can bind filters based on certain conditions. CRM Analytics supports multiple operators that provide flexibility when defining the conditions.

Let's say you have these results from the source query.

You can bind a filter using the asEquality() interaction function. This filter condition determines whether the returned value equals “bar".

After evaluating the interaction based on the data returned from the source query, CRM Analytics produces this filter.

If a selection returns multiple values, asEquality() inserts the 'in' operator, instead of ==, in the filter statement. For example, this filter condition determines if any value in the “grouping” column equals “bar”.

q = filter q by {{column(stepFoo.selection, ["grouping"]).asEquality("bar")}};

If the selection returns first and second, the filter becomes:

q = filter q by bar in ["first","second"];

Let’s say you want to filter the Case by Status widget in this dashboard based on the account selected in the Account list widget.

The Account list widget filters the other widgets in the dashboard based on the selected account.

Faceting doesn’t work in this case because the queries on these widgets are based on different datasets. To enable filtering, create an interaction in the Cases by Status widget’s query (Status_1) based on the selection in the Account widget’s query (AccountId_Name_1). This interaction compares the value of the AccountId.Name field in the Status_1 query to the selected values in the AccountId.Name field of the AccountId_Name_1 query. Because there can be multiple selected account names, use the in operator.

Let's say you have these results from a source query.

You can create a filter interaction using on an inequality operator.

After evaluating the interaction, the filter becomes:

Let's say you have these results from a source query.

You can create a filter interaction using on the matches operator.

After evaluating the interaction, the filter results are: