Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Filipe
Creator
Creator

Expressão count + if

boa tarde a todos da comunidade, uma pergunta bem simples.

Queria fazer uma métrica com usuários da modalidade "empresarial" e usuários ativos = 1;
Tenho essa formula -count(if([BENEFICIARIO MODADLIDADE] = 'EMPRESARIAL', [BENEFICIARIO STATUS]='1'))-

porque nesse caso ele não realiza o segundo filtro?

Obrigado pelo tempo.

Labels (1)
2 Solutions

Accepted Solutions
pravinboniface
Creator II
Creator II

Oi, Tudo bem?

I'm not clear if you are trying to count something?  You have to specify a dimension that you want to count.

Building on what @MatheusC said, I would say you need to add a dimension

count({< [BENEFICIARIO MODADLIDADE]={‘EMPRESARIAL’}, [BENEFICIARIO STATUS]={'1'}>} YOUR_DIMENSION)

View solution in original post

MatheusC
Specialist
Specialist

Você tem estes dois critérios de filtros, porém para qual finalidade? Ainda não ficou muito claro.

 

Talvez:

CountI{< [BENEFICIARIO MODADLIDADE]={‘EMPRESARIAL’}, [BENEFICIARIO STATUS]={'1'}>} [BENEFICIARIO MODADLIDADE])

 

Ou então

CountI{< [BENEFICIARIO MODADLIDADE]={‘EMPRESARIAL’}, [BENEFICIARIO STATUS]={'1'}>} distinct [BENEFICIARIO MODADLIDADE])

 

Se não for o acaso experimente mandar um excel com exemplo do resultado que deseja alcançar

Abraços

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!

View solution in original post

6 Replies
MatheusC
Specialist
Specialist

Oi, @Filipe 
Posso ter compreendido errado a necessidade, mais talvez somente os filtros citados dentro do Set Analysis {} não resolveria, sem a necessidade do if ?

{< [BENEFICIARIO MODADLIDADE]={‘EMPRESARIAL’}, [BENEFICIARIO STATUS]={'1'}>}

Abraço

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!
Filipe
Creator
Creator
Author

@MatheusC boa tarde matheus, você diz para eu fazer um count sem o if?

count({< [BENEFICIARIO MODADLIDADE]={‘EMPRESARIAL’}, [BENEFICIARIO STATUS]={'1'}>})

 

seria isso?

pravinboniface
Creator II
Creator II

Oi, Tudo bem?

I'm not clear if you are trying to count something?  You have to specify a dimension that you want to count.

Building on what @MatheusC said, I would say you need to add a dimension

count({< [BENEFICIARIO MODADLIDADE]={‘EMPRESARIAL’}, [BENEFICIARIO STATUS]={'1'}>} YOUR_DIMENSION)

Filipe
Creator
Creator
Author

Eu gostaria de contar 2 itens, todos que forem 'Empresarial' e todos que tem o Status = 1.

MatheusC
Specialist
Specialist

Você tem estes dois critérios de filtros, porém para qual finalidade? Ainda não ficou muito claro.

 

Talvez:

CountI{< [BENEFICIARIO MODADLIDADE]={‘EMPRESARIAL’}, [BENEFICIARIO STATUS]={'1'}>} [BENEFICIARIO MODADLIDADE])

 

Ou então

CountI{< [BENEFICIARIO MODADLIDADE]={‘EMPRESARIAL’}, [BENEFICIARIO STATUS]={'1'}>} distinct [BENEFICIARIO MODADLIDADE])

 

Se não for o acaso experimente mandar um excel com exemplo do resultado que deseja alcançar

Abraços

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!
Filipe
Creator
Creator
Author

Entendi o que me foi explicado, consegui com uma combinação de ambas as respostas.
meu objetivo e fazer uma soma de todos os 'EMPRESARIAS' que são ATIVOS.
Outra métrica para 'ADESAO' que são ATIVOS... e para todas minhas outras opções

Quando fiz --- "count({< [BENEFICIARIO MODADLIDADE]={EMPRESARIAL}, [BENEFICIARIO STATUS]={1}>}[BENEFICIARIO CODIGO COMPLETO])"--
Deu certinho o que eu precisava.