# Increment a global variable with a change node

**URL:** <https://discourse.nodered.org/t/increment-a-global-variable-with-a-change-node/44893>\
**Category:** General\
**Created:** [28 April 2021 20:45 UTC](https://discourse.nodered.org/t/increment-a-global-variable-with-a-change-node/44893 "2021-04-28T20:45:54Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [28 April 2021 20:53 UTC](https://discourse.nodered.org/t/increment-a-global-variable-with-a-change-node/44893/2 "2021-04-28T20:53:08Z")

</div>

Yes that's possible'  
Set Global metric  
JSONata expression  
`$globalContext("metric") + 1`

---

_[View the full topic](https://discourse.nodered.org/t/increment-a-global-variable-with-a-change-node/44893)._
