dimension elements with a quote character (') require a double quote to be interpreted correctly by the rules engine
example: ['department's'] -> ['department''s']
after modifying cells through rules, the consolidations of these cells won't match the new values.
To reconciliate consolidations add in your rules:
['Total'] = ConsolidateChildren('dimension')