Bucket Group mapping to Breakdown using script not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2025 11:30 AM
Use case: need to group field values based on a condition that can be shown on dashboard.
Table: Incident
Field: category
Field Values: Network,Applications,Inquiry / Help,Database
Condition:
if category in (Network,Applications,Inquiry / Help) then 'Software'
if category = Database then 'Hardware'
Dashboard view:
YTD Created | YTD Remediated | |
Hardware | 123 | 456 |
Software | 678 | 91011 |
Bucket Groups:
Hardware
Software
Breakdown mapping script:
var cat = function(x) {
var catvalue;
if (x == "Network" || x == "Applications" || x == "Inquiry / Help") {
catvalue = "Software";
}
else if (x == "Database") {
catvalue = "Hardware";
}
else {
catvalue = x;
}
return catvalue;
};
cat(current.category.toString());
Result:
Breakdown selection is showing zero score in Analytics Hub
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
solved