This part covers things you encounter when writing calculations in the MDX script: scopes, assignments, and similar.
Calculate statement, usually the first statement of the MDX script, aggregates the values of leaf members to their ascendants. Whenever you need to do something before that aggregation process, put those corrections before the
Calculate statement. Otherwise, put the calculations after it. The latter is something you'll do in majority of cases; the former will rarely be required.
The scope is a part of MDX script in which we modify the value for a specified subcube. It can be imagined as something similar to computed columns or triggers in the relational database, not in the sense of performance ...