It is possible to define one or more variables in the InterFormNG2 designer. The advantage is, that you can use variables e.g. to add up all the detail lines of a page and output the page total in the footer.
You can also use variables in normal XPath functions.
Another kind of variable is the workflow variable, which can be used for sending variables/information from the workflow to the template.
This video introduce the use of variables in the designer: