Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
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!