Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

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

Re: Calculating Sum while excluding and including conditions

May be this:

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

4 Replies

Re: Calculating Sum while excluding and including conditions

May be this:

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

MVP
MVP

Re: Calculating Sum while excluding and including conditions

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

Re: Calculating Sum while excluding and including conditions

Sunni,

That worked.  Thank you for your help.

Jeff

Re: Calculating Sum while excluding and including conditions

No problem. Glad I proved helpful.

Best,

Sunny

Community Browser