4 Replies Latest reply: Feb 24, 2015 1:51 PM by Justin Kelly

# 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

 EMPLOYEE DATE STATION QUANTITY A 02/14/2015 1 34 B 02/14/2015 2 34 C 02/14/2015 3 25 A 02/15/2015 2 28 B 02/15/2015 3 43 C 02/15/2015 1 41 A 02/16/2015 1 31 D 02/16/2015 2 27 C 02/16/2015 3 39 A 02/17/2015 1 26 B 02/17/2015 2 49 C 02/17/2015 3 29
• ###### Re: Employee Scorecard vs Score of Prior Date

Perhaps using the FirstSortedValue function. See attached qvw.

• ###### Re: Employee Scorecard vs Score of Prior Date

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.

 EMPLOYEE DATE STATION QUANTITY A 02/14/2015 1 22 A 02/14/2015 1 34 B 02/14/2015 2 24 B 02/14/2015 2 34 C 02/14/2015 3 28 C 02/14/2015 3 25 A 02/15/2015 2 14 A 02/15/2015 2 28 B 02/15/2015 3 22 B 02/15/2015 3 43 C 02/15/2015 1 20 C 02/15/2015 1 41 A 02/16/2015 1 19 A 02/16/2015 1 31 D 02/16/2015 2 18 D 02/16/2015 2 27 C 02/16/2015 3 27 C 02/16/2015 3 39 A 02/17/2015 1 29 A 02/17/2015 1 26 B 02/17/2015 2 18 B 02/17/2015 2 49 C 02/17/2015 3 16 C 02/17/2015 3 29
• ###### Re: Employee Scorecard vs Score of Prior Date

See attached qvw.

• ###### Re: Employee Scorecard vs Score of Prior Date

Thanks, Gysbert!!