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.

Dan_Kane
Administrator

Disclaimer: This is not MY tip. It was provided to me a while back by the Performance Analytics development team.

I am occasionally asked about using condition logic in a formula indicator, so here is the structure of using IF logic in a Performance Analytics formula indicator.

This is a simple example but should give enough information to work with.

Structure:   <EVALUALTION> ? <OUTCOME IF TRUE> : <OUTCOME IF FALSE>

Example: Let's say I want to know the average length of time it takes to review implemented changes. One challenge, however, is that if the denominator of a formula is 0, it will calculate as a null value in the scores. A way to work around that is to include a condition in the formula. In this example, when the number of implemented changes = 0, I want the entire formula to evaluate to 0 instead of null.

[[Number of implemented changes]] == 0 ? 0 : [[Summed duration of change review period for implemented changes]] / [[Number of implemented changes]]

In the example, each item inside of the [[ ]] is a defined indicator. It could be an automated indicator, a manual indicator, or another formula indicator.

2 Comments