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

Employee Scorecard vs Score of Prior Date

Hello!

I have data set up like the table below. I'm trying to build a scorecard for each employee that show their performance for the most recent day. I have that figured out with set analysis that shows their quantity for the last workday using

sum({<REPORT_DATE={'$(vLastWorkday)'}>} QUANTITY)

What I would like to do is show an employee's performance for yesterday and compare it to the last time they were at that station.

For example, for February 17th, Employee B had a quantity of 49 on Station 2. The last time employee worked Station 2 was on February 14th and he had a quantity of 34.

Also, Employee A had a quantity of 26 on Station 1 on February 17th, but the last time he was on Station 1 was February 16th.

Does any know an expression or something that I can do in the script that would work for both employees?

Thanks!

Justin

                                                                                                       

EMPLOYEEDATESTATIONQUANTITY
A02/14/2015134
B02/14/2015234
C02/14/2015325
A02/15/2015228
B02/15/2015343
C02/15/2015141
A02/16/2015131
D02/16/2015227
C02/16/2015339
A02/17/2015126
B02/17/2015249
C02/17/2015329
1 Solution

Accepted Solutions
Gysbert_Wassenaar

See attached qvw.


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
Gysbert_Wassenaar

Perhaps using the FirstSortedValue function. See attached qvw.


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks, Gysbert. What if there are multiple records for an employee for one station for one day? I suppose my actual data is more like the below, where this is a time stamp for every item completed at each station.

I tried adding SUM() around the QUANTITY in the FirstSortedValue expression and I tried AGGR() but I still couldn't get it to work.

EMPLOYEEDATESTATIONQUANTITY
A02/14/2015122
A02/14/2015134
B02/14/2015224
B02/14/2015234
C02/14/2015328
C02/14/2015325
A02/15/2015214
A02/15/2015228
B02/15/2015322
B02/15/2015343
C02/15/2015120
C02/15/2015141
A02/16/2015119
A02/16/2015131
D02/16/2015218
D02/16/2015227
C02/16/2015327
C02/16/2015339
A02/17/2015129
A02/17/2015126
B02/17/2015218
B02/17/2015249
C02/17/2015316
C02/17/2015329
Gysbert_Wassenaar

See attached qvw.


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks, Gysbert!!