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

Dúvida Sobre AGGR()

Pessoal,

Sou novo aqui e no uso do Qlikview. Agradeço a ajuda antecipadamente.

Tenho uma tabela com as colunas abaixo:

RegIDDataTelefoneTráfego
1 1/7/201821 9111111112000
21/7/201821 9111111113000
32/7/201821 9111111114000
41/7201821 922222223000
51/7/201821 922222224000
62/7/201821 922222222000
73/7/201821 922222223000
84/7/201821 933333332000

Preciso gerar uma analise que consolide o tráfego por telefone por dia com uma coluna que indique a quantidade de registros agregados como o exemplo abaixo:

DataTelefoneTráfego total# RegID
1/7/201821 91111111150002
1/7/201821 9222222270002
2/7/201821 91111111140001

Se puder, por favor me respondam com a sugestão de string na mensagem, estou sem a versão adequada para abrir QVWs no meu ambiente.

Att.,

Labels (3)
5 Replies
lfetensini
Partner - Creator II
Partner - Creator II

Olá amigo.

Caso eu tenha entendido sua dúvida, segue:

a) Objeto de tabela Pivot;

b) Colunas: Data e Telefone

c) Medidas:

c1) Sum(Tráfego)

c2) Count(DISTINCT RegID)

Com a tabela Pivot ele já vai agregar automaticamente suas dimensões.

Caso a necessidade for agrupar dentro da tabela linear e fizer questão do Aggr() por algum motivo em particular, então:

a) Objeto de tabela Linear;

b) Colunas: Data e Telefone

c) Medidas:

c1) Sum(Aggr(Sum(Tráfego), Data, Telefone))

c2) Count(Aggr(Count(DISTINCT RegID), Data, Telefone))

Support your colleagues. Remember to "like" the answers that are helpful to you and flag as "solved" the one that helped you solve. Cheers.
Anonymous
Not applicable
Author

Olá Luis,

Veja os resultados das suas sugestões:

1) Pivot Table

   

DataMSISDN=Sum(GGSN_Tráfego)=Count(DISTINCT RegID)
21/07/2018219956777533001
21/07/2018219956777533101
21/07/2018219971866222801
21/07/2018219971866222801
21/07/2018219971866222801

2) Tabela Linear

  

DataMSISDN= Sum(Aggr(Sum(GGSN_Tráfego), Data, MSISDN))=Count(Aggr(Count(DISTINCT RegID), Data, MSISDN))
8903
21/07/2018219956777533001
21/07/2018219956777533101
21/07/2018219971866222801
21/07/2018219971866222801
21/07/2018219971866222801

O que espero de resultado:

   

DataMSISDNTráego TOTAL# RegID
21/07/2018219956777536102
21/07/2018219971866228403

Agradeço a ajuda.

Att.,

lfetensini
Partner - Creator II
Partner - Creator II

Você pode compartilhar sua aplicação para análise?

Support your colleagues. Remember to "like" the answers that are helpful to you and flag as "solved" the one that helped you solve. Cheers.
Anonymous
Not applicable
Author

É muito grande. Desculpe

lfetensini
Partner - Creator II
Partner - Creator II

Segue um exemplo:

https://ufile.io/0wk1f

Possivelmente eu tenha entendido algo diferente do que você espera, faça o Count() sem o uso de "distinct".

Support your colleagues. Remember to "like" the answers that are helpful to you and flag as "solved" the one that helped you solve. Cheers.