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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

sum with exclusion

Hi all,

how can I exclude some from a calculation?

for example

Salesman Sales

A                   20

B                   35

C                   20

D                   21

A                   32

B                   2

and I want to make a sum of sales without B & C; and when I filter Salesman A, the sum must be just for Salesman A

Thanks,

Cosmin

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

sum({$*<Salesman-={'B','C'}>}Sales)


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
its_anandrjs
Champion III
Champion III

Oh Sorry i forget now check and yes as always Gysbert is correct

You can try like

Dimension:- Salesman

Expression:- sum({$<Salesman-={'B','C'}>}Sales)

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

sum({$*<Salesman-={'B','C'}>}Sales)


talk is cheap, supply exceeds demand
Not applicable
Author

Hi,

the sum for B+C is ok

but if I filter salesman B the sum is also B+C

thanks

Not applicable
Author


Thanks Gysbert,

as always, it worked

best regards,

Cosmin

fkeuroglian
Partner - Master
Partner - Master

Hi, try this in the expression

SUM({<Salesman-={'B','C'}>} SALES)

see this link and this manual , will be useful to the set analisys

Fernando

Set Analysis - Ejemplos

Not applicable
Author

very useful

thanks