Formula indicator not showing scores

acrascall
Kilo Expert

Hi All,

Using Geneva, Patch 9 in our instance.

I have a formula indicator:

( [[Number of successful changes / By month SUM +]] ) / ( [[Number of successful changes / By month SUM +]] + [[Number of failed changes / By month SUM +]] ) * 100

Which is linked to a widget, the widget details a Followed Breakdown of the Change Driver Group.   It seems when I view this widget for certain Driver Groups I cannot see any scores, transpires that I cannot see scores as there are no scores for one of the indicators. i.e. Number of failed changes

My assumption was that if there were no scores, then 0 would simply be referenced?   Don't believe this is the case though?   Any additional config required here?

pieter.goris vincentloffeld - can you help?   Perhaps a revision to my formula is required?

regards,

Andrew

1 ACCEPTED SOLUTION

acrascall
Kilo Expert

Both indicators "Number of successful changes"and "Number of failed changes" had the value for "Value when nil" as blank.



This meant that instead of the number "0" the formula was getting "nil" and as such is not able to calculate with that since it is expecting an integer. When the "Value when nil" to is set to "0" the formula was able to return a number and calculate correctly.



Thanks for everyone's help on this question. vincentloffeld arnoud


View solution in original post

9 REPLIES 9

Vincent Loffel1
Kilo Guru

Hi Andrew,



No formula indicator do not show 0 when the formula runs into an error. Because that is basically what happens (Div/0 = Error).



To get 0 as a result when no scores are available change your indicator to the following:



if (([[Number of successful changes / By month SUM +]] > 0) && ([[Number of failed changes / By month SUM +]] > 0 )) {


( [[Number of successful changes / By month SUM +]] ) / ( [[Number of successful changes / By month SUM +]] + [[Number of failed changes / By month SUM +]] ) * 100


} else { 0 }



Cheers,


Vincent


Thanks Vincent - formula indicator revised, although I still cannot see any % scores for those driver groups who don't have any failed changes.


Do you also have another endstate of a change? If not, you could just use the number of closed changes instead of specifying succcesful/failed changes.


Or change the formula to:



if (([[Number of successful changes / By month SUM +]] > 0) && ([[Number of failed changes / By month SUM +]] > 0 )) {


( [[Number of successful changes / By month SUM +]] ) / ( [[Number of successful changes / By month SUM +]] + [[Number of failed changes / By month SUM +]] ) * 100


} else {


if (([[Number of failed changes / By month SUM +]] > 0 )) {


( [[Number of successful changes / By month SUM +]] ) / ( [[Number of successful changes / By month SUM +]] + [[Number of failed changes / By month SUM +]] ) * 100


}   else { 100 }


}



or something like that. 🙂


Hmm, still cannot see any % value for a Driver Group who don't have any failed changes.