Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Performance Analytics – Formula indicator doesn’t support round() or max()

Med99
Tera Contributor

Hi,

I’m kinda new to Performance Analytics and I'm working on a formula indicator. I’m trying to apply a normalization formula like this:

round(max(-0.000000053 * score^3 + 0.0000411 * score^2 - 0.0109 * score + 1, 0) * 100)

Where score is another indicator.

However, in PA formula indicators:

round() is not recognized

max() is not recognized

So the formula fails with errors like “function not defined”.

Is there a way to use functions like round or max in PA formula indicators?

If not, how do you usually handle this kind of logic? 

Thanks

1 REPLY 1

Naveen20
ServiceNow Employee

Go with a Scripted Indicator — it's the most direct solution since your logic lives entirely within PA.

Navigate to Performance Analytics → Indicators, create a new indicator, set the type to Script, and use:

(function() {
    var score = /* your source score value */;

    var raw = -0.000000053 * Math.pow(score, 3)
            +  0.0000411   * Math.pow(score, 2)
            -  0.0109      * score
            +  1;

    return Math.round(Math.max(raw, 0) * 100);
})();

This gives you full Math.* support, runs during normal PA collection jobs, and works with breakdowns and dashboards just like any other indicator — no extra tables, fields, or business rules needed.