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

COUNT

Bom Dia!!

Alguém tem alguma ideia de como fazer essa coluna “QTD” fazer a soma ? e repetir a mesma conforme a imagem abaixo.

TURMA

GRATUIDADE

QTD

A

X

3

<-- Quantidade de vezes que a letra "A" aparece

A

X

3

"

A

Y

3

"

B

X

2

<--Quantidade de vezes que a letra "B" aparece

B

Y

2

"

C

X

2

<--Quantidade de vezes que a letra "C" aparece

C

X

2

"

D

Y

1

<--Quantidade de vezes que a letra "D" aparece

1 Solution

Accepted Solutions
rubenmarin
MVP
MVP

Sum(TOTAL <Gratuidade> Aggr(Count(TOTAL <Turma, Gratuidade> Turma)/Count(TOTAL <Turma> Turma)*Aula

,Turma, Gratuidade))

For BE result is 5,16: (1/3*8)+(1/2*5)=2,66..+2,5=5,16 (5,17 rounding)

View solution in original post

12 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Use a chart, use

TURMA

GRATUIDADE

as dimension and add an expression as Sum(QTD)

Let me know

rubenmarin
MVP
MVP

Hi Oliverira, maybe:

Count(TOTAL <TURMA> TURMA)

Anonymous
Not applicable
Author

Hi Ruben,

Worked, Thank you.

Anonymous
Not applicable
Author

Hi Ruben,

Teria como você ajudar: Pegar a quantidade da turma A por tipo de gratuidade, Exemplo

Turma A 2 X e

             1 Y ->

             2 X / quantidade de registro A (3)

                  * valor de "Aula" que é outra coluna

                   soma o resultado por gratuidade.

=Aggr(Count(Aula),Turma,Gratuidade) / Count(TOTAL <Turma> Turma)*Aula ( esta faltando a soma do resultado por gratuidade)

rubenmarin
MVP
MVP

Hi, not sure to understand (english or spanish to understand better) but maybe:

Count(TOTAL <Turma, Gratuidade> Turma)/Count(TOTAL <Turma> Turma)*Aula

Anonymous
Not applicable
Author

Hi, After this result, we now need to add a gratuity.

Turma  Aula Gratuidade

A           8       NG   -|     2 NG e 1 BE        2NG / QTD A * Aula(8) = x1

A           8       NG    |                               1BE / QTD A * Aula(8) = y1

A           8       BE   -|
B           5       NG   -|     1NG e 1BE          1NG/ QTD B * Aula(5) = x2

B           5       BE    -|                               1BE/ QTD B * Aula(5) = y2

C           6       NG   -|     2 NG                       

C           6       NG   -|                                 2NG/ QTD C * Aula(6) = X3


Sum NG = X1 + X2 + X3.......Xn

Sum BE = Y1 + Y2..............Yn

Anonymous
Not applicable
Author

Alssandro,

Hi, After this result, we now need to add a gratuity.


Turma  Aula Gratuidade

A           8       NG   -|     2 NG e 1 BE        2NG / QTD A * Aula(8) = x1

A           8       NG    |                               1BE / QTD A * Aula(8) = y1

A           8       BE   -|
B           5       NG   -|     1NG e 1BE          1NG/ QTD B * Aula(5) = x2

B           5       BE    -|                               1BE/ QTD B * Aula(5) = y2

C           6       NG   -|     2 NG                       

C           6       NG   -|                                 2NG/ QTD C * Aula(6) = X3


Sum NG = X1 + X2 + X3.......Xn

Sum BE = Y1 + Y2..............Yn

Anonymous
Not applicable
Author

Hi, Ruben.


you would have an idea of how to do this function?

rubenmarin
MVP
MVP

Can you post a sample with values and the result expected, I'm still not sure to understand, it gets complicated and don't want to waste time in something misunderstood...

If I understand it right NG should be (2/3*8)+(1/2*5)+(2/2*6)=13,83?