the problem with your transformation script is that it's not linear - it will return 71 when everything is OK and then 1 or more when some APs are down. So diff will actually grow as more APs will go down. I would recommend to call DCI "number of down APs" and return 0 when all APs are up. That way it will be consistent and diff() > 0 will not be triggered when all APs comes back online.
Best regards,
Victor
Best regards,
Victor