I am in the process of creating a database for a call center to calculate scores for people's phone calls. They are required to meet a certain level of professionalism and obviously follow the script, and their scores reflect that.
On the table, most of the fields are criteria the people are being scored on, but not all the criteria are applicable in every situation. The scores are on a 0-2 range, 0 being "did not meet criteria" and 2 being "met criteria perfectly". If the criteria is not applicable to the call (for example, there are criteria based on taking a credit card but not all customers pay with a credit card), then the score is left as NULL.
What I need help with is calculating the overall score. If the field for the criteria is left NULL, then I don't want it counted.
For all fields not left NULL, I want the query to calculate how many of those fields are not NULL and multiply the count by 2, and then take the actual score and divide it by the (count of fields NOT NULL*2). Also keep in mind that not all the fields in the table are criteria, so I need to specify which fields are relevant to this calculation.
Any help is appreciated. Thanks in advance!
On the table, most of the fields are criteria the people are being scored on, but not all the criteria are applicable in every situation. The scores are on a 0-2 range, 0 being "did not meet criteria" and 2 being "met criteria perfectly". If the criteria is not applicable to the call (for example, there are criteria based on taking a credit card but not all customers pay with a credit card), then the score is left as NULL.
What I need help with is calculating the overall score. If the field for the criteria is left NULL, then I don't want it counted.
For all fields not left NULL, I want the query to calculate how many of those fields are not NULL and multiply the count by 2, and then take the actual score and divide it by the (count of fields NOT NULL*2). Also keep in mind that not all the fields in the table are criteria, so I need to specify which fields are relevant to this calculation.
Any help is appreciated. Thanks in advance!