0

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"

  • What are you loading in the report? – Naval Sharma Dec 27 '18 at 7:58
  • I am loading Opportunities Dataset which i have created – moni Dec 27 '18 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'? – Naval Sharma Dec 27 '18 at 8:09
  • @NavalSharma It is Opportunity.Name only.. – moni Dec 27 '18 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)? – John Towers Dec 27 '18 at 18:19
1

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';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.