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: 
AndreFrencl
Contributor III
Contributor III

Sum com IF (aggr(

Amigos,

Crie uma expressão que permita especificar todos os IDs e faça parte de uma condição especificada e receba o certificado, sem erro.

= sum (

if (aggr ((sum(VB) / sum(METAVB) -1) <- 0,80, ID)
and 
aggr (sum (VB)> 0, ID)

1,0)
)

vejam essa tabela:

Capturar.PNG

Ele contém 1 ID que está dentro das regras e agora precisa somar em R $ a soma de todos os meses, que dá R $ 2474, como mostra o texto.

O problema é que, ao usar ou filtrar ID e exibir todos os registros que estão nessa regra, ou o  soma não funciona mais . 

função:

= if (
aggr ((sum (VB) / sum (METAVB) -1) <- 0,80, ID)
and
aggr (sum (VB)> 0, ID)
, sum(total <ID> VB)
)

Alguém tem alguma ideia?

Obrigado,

 

André

 

 

Labels (2)
1 Solution

Accepted Solutions
agigliotti
MVP
MVP

maybe this:

=sum( aggr( if( (sum(VB)/sum(METAVB)-1) < -0,80 and sum(VB) > 0, sum(total <ID> VB), 0 ), ID ) )

I hope it can helps.

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it

View solution in original post

3 Replies
rubenmarin
MVP
MVP

Hi, I'm not sure to understand it, but maybe:

Sum(Aggr(
  if((sum (VB) / sum (METAVB) -1) <= 0.80 and sum (VB)> 0
    , sum(VB))
, ID))
agigliotti
MVP
MVP

maybe this:

=sum( aggr( if( (sum(VB)/sum(METAVB)-1) < -0,80 and sum(VB) > 0, sum(total <ID> VB), 0 ), ID ) )

I hope it can helps.

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
AndreFrencl
Contributor III
Contributor III
Author

ooowww!! works, man!!!  it's  is!!!

Many thanks!!