...
f. From the Functions tab, select the required functions.
4. Click OK.
...
Please note the formula you create is only applicable for the following widget and cannot be saved in a data cube.
If you want to use the same formula for another widget you have to recreate the formula. everytime.
Only , Advance Analytics - Global Formulas allows you to save these custom formula to cube
Click here to know more about Global formulas.
"Measured Filters" - Creating Formulas Based on Criteria and Conditions
...