Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculating Sum while excluding and including conditions

I'm attempting to sum a value while conditionally excluding and including specific rows based on specific conditions.  I generated the following expression using the set analysis wizard for QlikView:

=Sum({$<Exchange-={'$(=OTC)','$(=NULL)','$(=PNK)'},[TR Adjusted Derivative Type]={'$(=Non-Derivative)'},[Trade to be Excluded?]={'$(=N)'}>}[TR Notional Value])

There are no values returned.  Something may be wrong with the syntax, but am unable to determine the problem.  Any feedback would be helpful.

1 Solution

Accepted Solutions
sunny_talwar

May be this:

=Sum({$<Exchange -= {'OTC','NULL','PNK'}, [TR Adjusted Derivative Type] = {'Non-Derivative'}, [Trade to be Excluded?] = {'N'}>}[TR Notional Value])

View solution in original post

4 Replies
sunny_talwar

May be this:

=Sum({$<Exchange -= {'OTC','NULL','PNK'}, [TR Adjusted Derivative Type] = {'Non-Derivative'}, [Trade to be Excluded?] = {'N'}>}[TR Notional Value])

petter
Partner - Champion III
Partner - Champion III

Non-Derivative   should probably  be  [Non-Derivative]    ?

Are OTC, NULL PNK .... etc variables?  If they are you will not need to use an equal sign...

Not applicable
Author

Sunni,

That worked.  Thank you for your help.

Jeff

sunny_talwar

No problem. Glad I proved helpful.

Best,

Sunny