Performance Analytics – Formula indicator doesn’t support round() or max()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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.
