• Thanks for your help.

    I had the following commented code before the syntax I posted previously.

    /*

    The CALCULATE command controls the aggregation of leaf cells in the cube.

    If the CALCULATE command is deleted or modified, the data within the cube is affected.

    You should edit this command only if you manually specify how the cube is aggregated.

    CALCULATE*/

    I removed this and my calculation now works!