How to create threshold and show a value?