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

Conditional Sum

Hello Good evening,

I would like to add the value of a field when the condition is valid, I'm using the following formula:

=IF(Sum(Aggr(Sum(Venta),Marca))>Sum(Aggr(Sum({<Tipo={[Medios]}>} Inversion),Marca)),Num(Sum(Aggr(Sum(Venta),Marca)),'$#,##0'))

But that expression gives me the total value of the sell and I would like to see onlye the value of the sell in those cases where the investment in media is grater. And that why I'm using the AGGT at a brand level

Does somebody can help me? Im using the formula in a text object

Thank you

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

=Num(SUM(Aggr(IF(SUM(Venta)>SUM({<Tipo = {'Medios'}>}Inversion),SUM(Venta),Marca)),'$#,##0')

View solution in original post

2 Replies
MK_QSL
MVP
MVP

=Num(SUM(Aggr(IF(SUM(Venta)>SUM({<Tipo = {'Medios'}>}Inversion),SUM(Venta),Marca)),'$#,##0')

Anonymous
Not applicable
Author

Thank you!!! It Works