Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
CBoardy
Contributor III
Contributor III

Sum Condition

Hi All 

I want to create a sum with conditions that select values depending on the value from another field in the table. The two Fields are 'Values'(Number)  & 'P&L Category' (String).

Sum({$<[Values] [P&L Category] = {'OIE'}>})

I want to sum all of 'Values' where 'P&L Category' = 'OIE'

is this possible to complete?

TIA

Labels (1)
1 Solution

Accepted Solutions
henrikalmen
Specialist
Specialist

If you want to sum(Values) but with predefined P&L Category you do it this way using set expression: sum({<[P&L Category]={'OIE'}> Values)

View solution in original post

3 Replies
henrikalmen
Specialist
Specialist

If you want to sum(Values) but with predefined P&L Category you do it this way using set expression: sum({<[P&L Category]={'OIE'}> Values)

CBoardy
Contributor III
Contributor III
Author

Thats great thanks,  how would I add another condition?

sum({<[P&L Category]={'OIE'}, [Var] = {'TGT'}>} Values)

Is that correct? 

@henrikalmen 

henrikalmen
Specialist
Specialist

Yes, that's right!