Performance Analytics - Manual Breakdown on String field - Sharing

HSU
Tera Contributor

Dear community,

 

let me share you, what took me hours to make it work.

Despite using AI, and search, there was no straight forward or complete step by step solution, due to missing pieces here and there.

 

Issue: String Field cannot be used as Automatic Breakdown

 

Solution: Create a Manual Breakdown -> make a Breakdown Source -> Use it as Automatic Breakdown with PA Script as Mapping 

firstly, the solution is mentioned below in:  

 

Step 1: Define the manual breakdown

  • 20260322-180924.jpg
 

Step 2: Make the Manual Breakdown a new Breakdown Source

20260322-181325.jpg

  • Set the Facts table: Manual Breakdown
  • Field: Sys ID
  • Conditions Breakdown is : Your manual breakdown

 

Step 3: Create the PA Script, which will be used later in the Automatic Breakdown

Go to page: pa_scripts_list.do

And create a new script

20260322-182139.jpg

  • Define the fact table and the field accordingly, on the String field
  • Code
//The Sys ID of the Manual Breakdown
var breakdown = 'SysID of the Manual Breakdown'

//Category of the CMDB
var value = current.category;

var sysID = '';

if (value && value != '') {
    var gr = new GlideRecord('pa_manual_breakdowns');
    gr.addQuery('breakdown', breakdown);
    gr.addQuery('value', value);
    gr.query();
    if (gr.next()) {
		//Return the SysID of the entry on the manual breakdown
        sysID = gr.getValue('sys_id');
    }
}

sysID || '';

 

 

Step 4: Create an Automatic Breakdown - Using that Breakdown Source & Create Mapping using the PA Script Above.

 

Create an Automatic Breakdown

  • Use the Breakdown Source created above
  • 20260322-182731.jpg

 

Create the Breakdown Mapping to the Fact Table and using the above PA Script

  • 20260322-183005.jpg

 

Step 5: Add the Automatic breakdown to the Indicator as usual

 

Step 6: Re-run you the Indicator Job as usual

 

Done

 

 

Now the Indicator and the "String field" Breakdown can be used in the Analytics Visualization.


image.png

0 REPLIES 0