Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
Need your help on something. I created a metric which should assign a score to customer or a piece of equipment depending on the number of notifications are created for the piece of equipment (an equipment is assigned to a customer). The scoring should be as follows:
As we know,we cannot do a count function in the script, so I have to execute this function in the 'front end' but then I cannot find a way to link the matching score to a number of notifications. I tried the following but this didn't quite work:
Score: =If(count(distinct(NotificationNr)) <= 10, 10, if( etc.))
The above function did not work because if there are more than 10 notifications the scoring is not assigned correctly anymore.
Does anyone have suggestions?
Thanks in advance
maybe I don't understant but the if should work
if(count(distinct notificationnr) <= 10, 10,
if(count(distinct notificationnr) <= 20, 9,
if(count(distinct notificationnr) <= 30, 8,
if(count(distinct notificationnr) <= 40, 7,
if(count(distinct notificationnr) <= 50, 6,
if(count(distinct notificationnr) <= 60, 5,
if(count(distinct notificationnr) <= 70, 4,
if(count(distinct notificationnr) <= 80, 3,
if(count(distinct notificationnr) <= 90, 2,
if(count(distinct notificationnr) <= 100, 1,
0
))))))))))
maybe I don't understant but the if should work
if(count(distinct notificationnr) <= 10, 10,
if(count(distinct notificationnr) <= 20, 9,
if(count(distinct notificationnr) <= 30, 8,
if(count(distinct notificationnr) <= 40, 7,
if(count(distinct notificationnr) <= 50, 6,
if(count(distinct notificationnr) <= 60, 5,
if(count(distinct notificationnr) <= 70, 4,
if(count(distinct notificationnr) <= 80, 3,
if(count(distinct notificationnr) <= 90, 2,
if(count(distinct notificationnr) <= 100, 1,
0
))))))))))
Thnx Massimo,
Is must have entered it wrong somehow because your solution is the right one. Thans again