required
if (a $lt; b)
eval c=round(((b-a)/b)*100),0)
print c
else
print "no change"
How to get this through splunk query?
Hi
Try this
| makeresults
| eval a=20,b=30
| eval c=if(a<b,round(((b-a)/b)*100,0),"no change")
Hi
Try this
| makeresults
| eval a=20,b=30
| eval c=if(a<b,round(((b-a)/b)*100,0),"no change")
thank you vnravikumar, it worked
@dkdeepshikhaa
Can you please try this?
| makeresults
| eval a=100,b=20,c="No Change"
| eval c=case(a<b,round(((b-a)/b)*100,0),1=1,c)
| makeresults
| eval a=100,b=200,c="No Change"
| eval c=case(a<b,round(((b-a)/b)*100,0),1=1,c)