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

Count for every month even if there is no occurrence

Hi all,

I have table which contains employee hire date, end date, employeeID and state (1=active, 0=no-active). Now I need a KPI =count({<State={'1'}>}EmployeeID) per month and it´s easy ofcourse add that count expression but it shows only count for months where employee has hired but I need count for every month.

Example:

EmployeeID     HireDate     EndDate     State

1                    1.9.2013       -                  1

2                    1.10.2013     -                  1

3                    1.11.2013     -                  1

4                    1.12.2013     -                  1

5                    1.2.2014      -                   1

I tried something like this =aggr(NODISTINCT( count({<State={'1'}>}EmployeeID)),Year) but it shows only count of hired person per month, not total count per month.

What should I do to solve this?

Thank you!

3 Replies
MK_QSL
MVP
MVP

Can you provide some more sample data ?

Not applicable
Author

Hi,

Pls see attached.

MK_QSL
MVP
MVP

Like this?

UPDATE : Change the expression to

=RangeSum(ABOVE(SUM(Flag1)+SUM(EmployeeTerminated),0,RowNo()))