Need help with PA Scripts to group the String field records

SathishK1716321
Tera Expert

Hello Community,

 

I have a requirement to add a Breakdown of the field called value, which is located on the incident_metric table. The below script doesn't work and needs help. I have created a Bucket group and added them under the breakdown sources, yet it is not collecting the records when the job is executed. The job run was successful, but there are no scores at the indicator level.

 

Breakdown source:

SathishKumarS_2-1730214477184.png

 

 

bucket groups:

 

SathishKumarS_1-1730214030847.png

 

pa_scripts:

 

 

 

var checkValue = function(mi_value) {
    if (mi_value == "Yes") return 0;
    else return 1;
};
checkValue(current.mi_value.toString());​

 

SathishKumarS_0-1730213776139.png

 

@Adam Stout @Arnoud Kooi

 

#performanceAnalytics #PA

 

1 REPLY 1

OlekS6383883333
Tera Contributor

I had a similar problem, I ended up spacing out the values for the bucket group more and it worked.

So for first group I did start = 0 and end = 2
for second group I did start = 2 and end = 4

See the attached image

OlekS6383883333_0-1776356296126.png