Reporting on Unique Values from a Field that Allows for Multiple Selections

MikeP
Kilo Contributor

Hi all,

This is a bit of a tricky one, I hope someone can help.

In APM, we have a custom field to track data category (see attachment). This field allows from multiple selections as an application could fall into more than one category. I have a request to create a report (pie chart) that shows the breakdown of applications by each unique data category. The issue I'm having is if more than one value is selected, it's showing up as a unique value for the combination of values vs. counting the application for each of the category types.

In the attached screenshot you can see that we have 11 applications that fall under 'Customer PII' and 'Customer IP' categories and these have been grouped together as one result. I'm trying to get these to display as two separate categories with a count of 11 each.

Thoughts?

3 REPLIES 3

Shakeel Shaik
Giga Sage
Giga Sage

Hi, 

You can test this on Background Script for more clarification

var userSysid = ['abc1','abc1','abc2']; //Replace Field name that will stores Multiple values

var au = new ArrayUtil();
sysidUnique = au.unique(userSysid);
for (var i = 0; i < sysidUnique.length; i++) {
gs.print(sysidUnique[i]); //Will get unique 
}

 

Thanks:)

 

Thanks,
Shakeel Shaik 🙂

var userSysid = ['abc1','abc1','abc2']; //Replace Field name that will stores Multiple values

var au = new ArrayUtil();
sysidUnique = au.unique(userSysid);
gs.print(sysidUnique); //You will get all Unique values in one go

//for (var i = 0; i < sysidUnique.length; i++) {
//gs.print(sysidUnique[i]); //Will get unique values for each loop
//}

Thanks,
Shakeel Shaik 🙂

Hi MikeP

 

If my above response is helpful, then Please mark as Correct Answer/Helpful.

 

If you have any queries, let us know.

 

Thanks 🙂

Thanks,
Shakeel Shaik 🙂