If you just want the "final" integral (i.e. at the end of the simulation, over the entire horizon) of a calculator variable, you can add that calculator variable as a variable to the objective evaluation and tick the integral time series criterion. If you don't want this integral to be taken into account for the overall objective value computation, you can set the weight of the integral criterion to 0 (or set the weight of the variable to 0 if the integral is the only criterion that is active).
If you want the integral to be computed at every time point, you cannot do with calculator variables. Calculator variables are in fact the old (pre-2017), limited approach to defining additional top-level computations. The new top-level items window (that Enrico is referring to) supersedes the old calculator variables and also adds extra possibilities such as aggregation (e.g. integral computation) and much more. Actually, the top-level items approach even allows for computing the integral in 2 ways: through a differential equation and through the MSLUBuffer functionality. The first is the simplest, but the latter is more versatile since it allows for using a moving window for the integral computation (should this be necessary).
See the attached screenshot.