Performance Analytics Weighted Survey Results with break down by user & group.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago - last edited an hour ago
I created this for our organization and did not see any guides on how to do so. I thought I would write up a guide to hopefully help someone else.
This will take survey results, add a weight to each question, then calculate the average with breakdowns by user and group.
Create a Survey and add the % each question should have out of 100 to the weight field.
Each question should have values 1-5
Create an Indicator Source
Create an Indicator, set the aggregate to average, collect records, scripted True.
Add your Survey SYSID to the script below
var CATEGORY_ID = 'Survey SYSID'; //<- change to sysid of your survey
var instanceId = current.sys_id;
var total = 0;
var instanceCount = 0;
var average = 0;
var ga = new GlideAggregate('asmt_metric_result');
ga.addQuery('instance', instanceId);
ga.addQuery('metric.category', CATEGORY_ID);
ga.addQuery('weighted_value', '>', 0);
ga.groupBy('instance');
ga.addAggregate('SUM', 'weighted_value');
ga.query();
while (ga.next()) {
total += parseFloat(ga.getAggregate('SUM', 'weighted_value')) || 0;
instanceCount++;
var average = instanceCount > 0 ? (total / instanceCount) : 0;
}
average;Filter on only complete surveys
Collect breakdown matrix to true.
Add breakdowns to the indicator for Assigned to & Assignment group.
Be sure to add the survey table to each break down
Add jobs to run the indicator
This should give you a breakdown over time by person and group.
- Labels:
-
Benchmarks
