Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Consecutive month below productiviy standards

Hi, I have a chart (straight table) : sample below and attached. I am trying to add another expression after productivity %, determines number of consecutive months that an employee has been below the productivity standards (current standard is < =20%). above 20% is below standards.  Any idea?

CaptureProd.JPG
















































































MonthEnployeeProductivity %
07/01/12Amy10
07/01/12John22
07/01/12Faith20
06/01/12Amy10
06/01/12John21
06/01/12Faith22
05/01/12Amy25
05/01/12John20
05/01/12Faith23
04/01/12Amy10
04/01/12John11
04/01/12Faith12
03/01/12Amy56
03/01/12John17
03/01/12Faith20
1 Solution

Accepted Solutions
swuehl
MVP
MVP

Ok, I think I misunderstood your request.

Try replacing all occurrences of > 20 with <=20

View solution in original post

3 Replies
swuehl
MVP
MVP

Maybe like this?

INPUT:

LOAD Month,

     Enployee as Emp,

     [Productivity %] as Prod

FROM

.\productivity.xlsx

(ooxml, embedded labels, table is Sheet1);

LOAD *, if(Prod > 20, 0 ,AutoNumber(recno(),GroupID)) as ConsecutiveMonth;

LOAD *, if(Prod > 20, Null(), if(peek(Emp) <> Emp or peek(Prod) > 20 ,recno(), peek(GroupID) )) as GroupID resident INPUT

order by Emp, Month;

drop table INPUT;

Not applicable
Author

Thanks,

I am not sure if that is working correctly, I want when I click on July for example for number of consecutive month to read consecutive months from July where the PROD is greater than 20%. I am not sure how the GROUPID works in your load

swuehl
MVP
MVP

Ok, I think I misunderstood your request.

Try replacing all occurrences of > 20 with <=20