Script doesn't work

hi all,
I tried tow ways:

metric Sum accessSuccess
script: _value*100/doc[‘accessStatus’].sum()

or

metric Sum accessSuccess
script: _value*100/doc[‘accessStatus’].value

are the same value and run isnot correct

Do you know why?

Many thanks
ThuyLe

No idea, so the sum of your expression over the date histogram interval is not correct

even I put it auto, it doesn’t run correct