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: 
Not applicable

Sum Only Expression Help!

Hi gang, i need your help. I need to sum only regional contracts. I have a listing of contracts, and some of them are tagged as "regional." How can i sum only regional contracts using an expression?

VendorValueContract Type
Ricks' Car$10Regional
Jim Auto$55Regional
J&J taxi$5Local

the answer would be $65 (Ricks and Jims total)

Regards,

Brian

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

Brian, you could use a sum(if()) for this

=sum( if([Contract Type] = 'Regional', Value))

or equivalent, but better performing a set expression

=sum( {<[Contract Type]={Regional}>} Value)

Just put this expression in a chart object, e.g. a text box.

Hope this helps,

Stefan

View solution in original post

1 Reply
swuehl
Champion III
Champion III

Brian, you could use a sum(if()) for this

=sum( if([Contract Type] = 'Regional', Value))

or equivalent, but better performing a set expression

=sum( {<[Contract Type]={Regional}>} Value)

Just put this expression in a chart object, e.g. a text box.

Hope this helps,

Stefan