Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
JamesR
Contributor
Contributor

Include and Exclude in Expression

I have a situation where I need to sum data that falls into a certain stage, but exclude certain names.

Today I have this running, Sum({StageName={'Closed Won'}>}TotalPrice

Now I wish to exclude any records where the field Opportunity.Name contains 'renewal' or 'Renewal'

 

What I was trying to do was to insert that expression with something like

If(Not Match(Opportunity.Name, 'renewal', 'Renewal'), Sum({StageName={'Closed Won'}>}TotalPrice)

I can't seen to get this to work no matter how many ways I chop it up.

Labels (2)
1 Solution

Accepted Solutions
rwunderlich
MVP
MVP

We both forgot a <

Sum({<StageName={'Closed Won'}, Opportunity.Name-={"renewal"}>}TotalPrice

-Rob

View solution in original post

3 Replies
rwunderlich
MVP
MVP

Sum({StageName={'Closed Won'}, Opportunity.Name-={"renewal"}>}TotalPrice

Note that "renewal" in double quotes is a case insensitive search, so will exclude both "renewal" and "Renewal". 

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

JamesR
Contributor
Contributor
Author

Sum({StageName={'Closed Won'}, Opportunity.Name-={"renewal"}>}TotalPrice)

still throws error of expected }, and I can't figure out where

rwunderlich
MVP
MVP

We both forgot a <

Sum({<StageName={'Closed Won'}, Opportunity.Name-={"renewal"}>}TotalPrice

-Rob