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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Expression Filtering

Hi,

I wish to sum sales revenue, for a particular set of accounts, for a singular brand.

So far, I have tried the below, but, I want to increase it to CUST002,003 etc.

Sum(Aggr(If([Account Code]='CUST001',  Sum({1<Brand={"Cola"},Year={">2015"}>}[Sales Revenue]])

Is there a better way to achieve this?

1 Solution

Accepted Solutions
marcus_sommer

Why not extending your set analysis to this filter, like:

Sum({1<Brand={'Cola'},Year={">2015"}, [Account Code]={'CUST001','CUST002','CUST003'} >} [Sales Revenue])

maybe also with a wildcard:

Sum({1<Brand={'Cola'},Year={">2015"}, [Account Code]={'CUST00*''} >} [Sales Revenue])

and you will rather not need an aggr within your expression (or you should post the complete expression).

- Marcus

View solution in original post

1 Reply
marcus_sommer

Why not extending your set analysis to this filter, like:

Sum({1<Brand={'Cola'},Year={">2015"}, [Account Code]={'CUST001','CUST002','CUST003'} >} [Sales Revenue])

maybe also with a wildcard:

Sum({1<Brand={'Cola'},Year={">2015"}, [Account Code]={'CUST00*''} >} [Sales Revenue])

and you will rather not need an aggr within your expression (or you should post the complete expression).

- Marcus