Thursday, June 21, 2007

Problem with Calculated Members in SSAS

Have you ever experienced disappearing all your data in the cube after putting a calculated member to it?
This strange thing heppened to me once,
I created this simple cube with SSAS, Deployed it and Processed it. After that I browed it with BI studio and the data were diplayed correctly.
Then I added a calculated member and processed the whole project again. Here I have an empty cube with no data. I processed and processed, which didn't make my data come back!!
Then I found the reason for this in MSDN forum
It was a stupid thing I did;
In you cube design screen, in Calculations tab, you have a pane in right hand side called 'Script Organizer' which lists all your scripts. There is one item called 'CALCULATE' by default. I have accidently deleted this item. When you do that it doesn't give any error and the project is processed successfully and the newly added calculated member is diplayed, but it makes the cube to be empty or disappear the data inside the cube.
You can put this 'CALCULATE;' statment either in the script organizer pane or somewhere in the script of your calculated member. Then the problem is solved.


No comments: