This article explains how to create a calculated measure and set its various attributes such as Name, Associated Measure Group, Format string etc.
In the Expression field, write an MDX statement or, in the Measures list, drag the measures to be used into the workspace in the middle.