press ctrl+alt+v and the variable overview will open up infront of you. There You can click on ADD button to create a new variable. After clicking on the ADD button it will ask you to give the name of the variable. Write the varable name and press OK. Then Select the variable name you created and after that write your expression in the Defination Box Below e.g. Sum(Amount).
After you have declared variable, you can use it anywhere in the frontend to display the result. For Example, Create a text box. Go into the properties of Text Box and Write =$(NameOfVariable) and press ok to see the expression result written in your textbox.
Screenshot of Tresesco comment will help you understand my comment.
Hope it helps