You can put expressions in variables and use the variables in chart expressions. For example a variable vSum with as value sum(Sales) can be used in a chart expression as $(vSum). Variables can be nested so you can construct quite complex constructions.