1

I have written my saql like

q = load "Opportunities";
q = filter q by !('Opportunity.Name' in ["test","TEST ","Test"]);
q = group q by 'Opportunity.Name';
q = foreach q generate 'Opportunity.Name' as 'Opportunity.Name', count() as 'count';

Also I have tried

q = load "Opportunities";
q = filter q by 'Opportunity.Name' not in ["test","TEST ","Test"];
q = group q by 'Opportunity.Name';
q = foreach q generate 'Opportunity.Name' as 'Opportunity.Name', count() as 'count';

But in the final results I am getting the Opportunity names contains "Test","TEST"

5
  • What are you loading in the report? Commented Dec 27, 2018 at 7:58
  • I am loading Opportunities Dataset which i have created
    – moni
    Commented Dec 27, 2018 at 8:01
  • It could be an issue with the left operand. Do you mind double checking the Opportunity.Name? Should it not be just 'Name'? Commented Dec 27, 2018 at 8:09
  • @NavalSharma It is Opportunity.Name only..
    – moni
    Commented Dec 27, 2018 at 8:57
  • The filters in your question would exclude an exact match - are you looking to exclude a partial match (i.e., any opportunity with the word "Test" in the name)? Commented Dec 27, 2018 at 18:19

1 Answer 1

3

If you want to exclude any opportunity with "Test" in the name I think you would want to use the matches operator.

q = load "Opportunities";
q = filter q by !('Opportunity.Name' matches "test") && !('Opportunity.Name' matches "Test") && !('Opportunity.Name' matches "TEST");
q = group q by 'Opportunity.Name';
q = foreach q generate 'Opportunity.Name' as 'Opportunity.Name', count() as 'count';
1

You must log in to answer this question.

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