I want to replace empty cells within olap cube by 0 in order to show them without having to click on "Show empty cells" button (ssms). I mean even if we don't click on it, empty cells are changed with 0s and shown.
Is there a way to achieve this?
I would handle this case in the ETL, to either replace the NULL values with 0 OR with NoValue, depending on the context. But if you really want to do it in the Cube, then you can add an MDX script to your calculations, something like:
SCOPE ([Measures].[Activity]);
THIS=IIF(ISEMPTY([Measures].[Activity]),0,[Measures].[Activity]);
END SCOPE;
More detailed info here.