IF Statement or similar

robertmueller
Giga Contributor

Hi All,

Does anyone know the formula that I would need here.

I have a calculation (formula indicator) that is 1440/(count of incident) so for example if there was 5 incidents that day it would be 1440/5. Simple enough, however I need to be able to state that if there were no incidents that day the answer should be 1440 not 0 like it currently gives. Can anyone help?

1 ACCEPTED SOLUTION

Alikutty A
Tera Sage

It would be something like this, Replace with your actual indicator name and try it

if ([[Count Of Incidents Indicator]] > 0) { [[1400]]/[[Count Of Incidents Indicator]]} else { 1440 }

 

 

View solution in original post

16 REPLIES 16

Omkar Mone
Mega Sage

Hi 

 

something like this would help :- 

 

get the total number of incidents in a variable which is by default set to 1.

now if(count>1)

{

1440/count

else if(count==1)

{

1440/count//this would be 1 by default so it would give you the same result.

}

Alikutty A
Tera Sage

Hello,

You need to use If Else in your formula indicator. Can you please paste your existing Formula from the indicator?

Jane Stone
Kilo Guru

In a formula indicator you can do it like this;   [[Indicator]]=0?1440:[[Indicator]]

Alikutty A
Tera Sage

It would be something like this, Replace with your actual indicator name and try it

if ([[Count Of Incidents Indicator]] > 0) { [[1400]]/[[Count Of Incidents Indicator]]} else { 1440 }