Using autoFilter to facet SAQL / PIGQL queries on your Dashboard from other compact form steps in Salesforce Analytics Cloud

A few releases ago, the Analytics Cloud Product team introduced a feature called autoFilter. This was introduced to make it easier to have your SAQL steps facet on selections of compact from steps without having to add in all of the selection bindings.

I myself , have been in the situation previously.. where my whole dashboard is compact form - however I needed a graph that was a calculation , I would then go through the process of making all of the selection bindings to make sure that all of the graphs faceted in the same way on the page. In the end.. I would usually just build everything in SAQL for consistency sake.. so I got a really good work flow happening with just doing SAQL straightway.. anyway…. you may no longer need to do this.. as autoFilter maybe useful in a number of scenarios that were before destined to be time spent doing selection bindings.

in the example below.. We are going to take the dashboard that I built to show the Date Range Static Step and Selection Bindings for SAQL and Compact form. What we want to achieve now… is that when I press a value on the compact from Graph on the right hand side, the left hand side SAQL graph facets on the the selection.


The first thing to do is add some groupings to each graph to show the interaction between the graphs is one way, SAQL —> Compact. On the compact form - I am going to group the compact query by ‘Carrier’ and on the SAQL query I am going to group by ‘DestinationState’ ( This is using the OnTime Dataset I use for all of my examples )

The compact form now looks like this:

Lets now do the same using the SAQL step:

We now end up with the following result….


As you can see in the above video is that we have a one way filter or facet. When we select the SAQL graph the compact form filters on the selection automatically however this isn’t the same the other way… When we select the compact form graph the SAQL graph does not facet. We can fix this with the autoFilter option. There are a couple of changes we need to make to to the SAQL step.

  1. UseGlobal set to true
  2. add in the autoFilter parameter in the measure section and set to true.

The SAQL step now should look like the below code:

With these selections being added to the step we now see the following result:


We can now add other compact form or declarative graphs and the SAQL step will automatic facet when selections on those other graphs are also selected.


Below is the full dashboard JSON including all of the above steps and parameters: