rules
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')









You could use alias
I had such a problem with apostrophe and what I used was an alias without it (I did not know about the double quote). You need to be aware of consequences though.