I am starting to work with einstein analytics and SAQL and I already searched on internet before posting this question but I couldn't find an answer to my problem.

I need help to know how can I reference other query results in a filter with SAQL. Basically I want to filter a dataset of Users by Username that are not in other query results or dataset.

This is what I am trying:

q = load "Users";
q = filter q by 'IsActive' == "true";
q = filter q by 'Business_Line_Business__c' == "COV";
q = filter q by 'Username' not in {{ results(all_2)}};
q = group q by all;
q = foreach q generate unique('Username') as 'unique_Username';
q = limit q 2000;

Query "all_2":

q = load "LightningPageViewWithUsers";
q = group q by 'User.Username';
q = foreach q generate 'User.Username' as 'Username', count() as 'count';
q = order q by 'Username' asc;
q = limit q 2000;

The error I've got is "Binding has not been parsed or has validation errors".

Thank you in advance

1 Answer 1


Bindings (or Interactions as they are called now) have a very strict syntax, and you don't get very good help on error correction, it usually just crashes. Anyway, here is the documentation: Bindings documentation

Your problem would need something like the following code:

 q = filter q by !({{column(all_2.result, ["Username"]).asEquality("Username")}}); 

The .asEquality creates

Username in ["XYZ", "YZX", ....]
Since you want to exclude these users, you have to surround it with !(...)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .