Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
In an application for a customer, we're calculating a score based on a number of factors that represents the overall driving behaviour.
Now we want to compare the employee's individual score vs the average score.
Currently, I'm using the following formula:
(
(Sum(total<Year,Month,Week>{<MessageType = {'Acceleration'}>}IndType)*(Max({<MessageType = {'Acceleration'}>}WeightFactor))/10)
+
(Sum(total<Year,Month,Week>{<MessageType = {'Deceleration'}>}IndType)*(Max({<MessageType = {'Deceleration'}>}WeightFactor))/10)
+
(Sum(total<Year,Month,Week>{<MessageType = {'Curve'}>}IndType)*(Max({<MessageType = {'Curve'}>}WeightFactor))/10)
+
(Sum(total<Year,Month,Week>IndSpeed)*(Max({<%MessageTypeKey = {200}>}WeightFactor))/10)
)
/4
/ ((Sum(total<Year,Month,Week>Distance)/1000)/50)
The problem is, it gives me the average for that week, listing the weekly average in general next to each employee, so they can see the number theirs is being compared with, except that for one employee, the average is off. See screenshot:
Anyone an idea on how this is possible or what may be the cause?
Thanks in advance.
Kind regards,
Tim Poismans
May be this
(
(Sum(total<Year,Month,Week>{<MessageType = {'Acceleration'}>}IndType)*(Max(total<Year,Month,Week>{<MessageType = {'Acceleration'}>}WeightFactor))/10)
+
(Sum(total<Year,Month,Week>{<MessageType = {'Deceleration'}>}IndType)*(Max(total<Year,Month,Week>{<MessageType = {'Deceleration'}>}WeightFactor))/10)
+
(Sum(total<Year,Month,Week>{<MessageType = {'Curve'}>}IndType)*(Max(total<Year,Month,Week>{<MessageType = {'Curve'}>}WeightFactor))/10)
+
(Sum(total<Year,Month,Week>IndSpeed)*(Max(total<Year,Month,Week>{<%MessageTypeKey = {200}>}WeightFactor))/10)
)
/4
/ ((Sum(total<Year,Month,Week>Distance)/1000)/50)
May be this
(
(Sum(total<Year,Month,Week>{<MessageType = {'Acceleration'}>}IndType)*(Max(total<Year,Month,Week>{<MessageType = {'Acceleration'}>}WeightFactor))/10)
+
(Sum(total<Year,Month,Week>{<MessageType = {'Deceleration'}>}IndType)*(Max(total<Year,Month,Week>{<MessageType = {'Deceleration'}>}WeightFactor))/10)
+
(Sum(total<Year,Month,Week>{<MessageType = {'Curve'}>}IndType)*(Max(total<Year,Month,Week>{<MessageType = {'Curve'}>}WeightFactor))/10)
+
(Sum(total<Year,Month,Week>IndSpeed)*(Max(total<Year,Month,Week>{<%MessageTypeKey = {200}>}WeightFactor))/10)
)
/4
/ ((Sum(total<Year,Month,Week>Distance)/1000)/50)
Should've thought of that.
But I don't see how that makes the difference for just that one employee?
I am guessing that this employee might have a different Max WeightFactor compared to others.... you can check this by adding a new expression Max(WeightFactor) and see if that is true. Add different set analysis to check all of them if you wish to confirm
Just checked, he indeed does have one different weight factor for one of the factors.
Thank you very much again!