Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Olá pessoal! Tudo bem?
Sou nova no Qlik, gostaria de fazer a contagem de "admissão por mês" e "admissão por ano".
Porém o Qlik está me dando uma quantidade incorreta, ou seja, ele desconsidera os admitidos DESLIGADOS. Poderiam me ajudar? Obrigada!
Sample data and output view pls, so we know what fields you have in your model and what your expectations are.
Hi!
to accurately count monthly and yearly admissions, including employees who have already been terminated, you can adjust your script to load all admissions data without filtering by the "SITUACAO_COLABORADOR" status. Below, I suggest modifying the script to ensure that it captures all admissions data, allowing you to apply filtering or adjustments within the Qlik app.
[ODS_RH_CONTRATADOS]:
LOAD
[MATRICULA] AS [MATRICULA-ID_VAGA],
[FUNCIONAL],
[NOME_COMPLETO],
[CPF],
Month([DT_ADMISSAO]) AS MES_ADMISSAO,
YEAR([DT_ADMISSAO]) AS ANO_ADMISSAO,
[DT_ADMISSAO],
[DT_NASCIMENTO],
IF(age(TODAY(), DT_NASCIMENTO)>=0 AND age(TODAY(), DT_NASCIMENTO)<=18, 'Up to 18 years',
IF(age(TODAY(), DT_NASCIMENTO)>=19 AND age(TODAY(), DT_NASCIMENTO)<=24, '19 to 24 years',
IF(age(TODAY(), DT_NASCIMENTO)>=25 AND age(TODAY(), DT_NASCIMENTO)<=29, '25 to 29 years',
IF(age(TODAY(), DT_NASCIMENTO)>=30 AND age(TODAY(), DT_NASCIMENTO)<=45, '30 to 45 years',
IF(age(TODAY(), DT_NASCIMENTO)>=46 AND age(TODAY(), DT_NASCIMENTO)<=59, '46 to 59 years',
IF(age(TODAY(), DT_NASCIMENTO)>=60, '60 years or more'
))))))
AS AGE_GROUP,
[CARGO],
[SUPERIOR_HIERARQUICO],
[CENTRO_CUSTO],
[AREA_ATUACAO],
[VINCULO_EMPREGATORIO],
[SITUACAO_COLABORADOR],
[DT_RESCISAO],
[COR],
[TIPO_DEFICIENCIA],
[GRAU_INSTRUCAO],
[CIDADE_RESIDENCIA],
[ESTADO_RESIDENCIA],
[MODALIDADE_CONTRATO],
APPLYMAP('__cityKey2GeoPoint', APPLYMAP('__cityName2Key', LOWER([CIDADE_RESIDENCIA])), '-') AS [ODS_RH_CONTRATADOS.CIDADE_RESIDENCIA_GeoInfo]
FROM [lib://RH/ODS_RH_CONTRATADOS.qvd] (qvd);
This adjustment removes the where Match([SITUACAO_COLABORADOR],'Em Atividade Normal','Gozando Férias','Auxílio-Doença','Licença-Maternidade') filter, ensuring that all records are loaded, including those with a terminated status. After loading this data, you can create charts or tables in Qlik with the following expressions to count admissions by month and year without excluding terminated employees:
Monthly admissions count: Count({<MES_ADMISSAO>} [MATRICULA-ID_VAGA])
Yearly admissions count: Count({<ANO_ADMISSAO>} [MATRICULA-ID_VAGA])
This approach ensures that all admitted employees, whether active or terminated, are included in the count.