Uncategorized.

Calculate Command Missing

by:  on

I came across an interesting scenario to troubleshoot in Analysis Services. When I was browsing cube, I was not getting any values for any of the measures. I looked into the data source view and checked all relations. I checked the dimension usage tab and processed each dimension separately. I did not get any error and I was able to browse dimensional data. I then processed the cube, checked row counts to make sure fact data is getting processed. Cube got processed successfully but when I browsed it, I was not getting data for any of the fact measures.

It was surprising as there were no errors while processing the cube and still cube was not working for me. I opened the cube in BIDS and selected the Calculations tab. From toolbar, I selected ‘Script View’ option. I found that the Calculate command which is by default mentioned at the beginning of the script section was missing. I added Calculate command with a semicolon at the end as mentioned below.

CALCULATE;
After adding Calculate command, I processed the cube and browsed it. The issue got fixed and cube started working properly. Somehow, calculate command got deleted while making changes to the MDX calculations. Calculate command should not be removed as it controls the aggregations and calculations from leaf level nodes. You should define all your MDX calculations after the calculate command. Even if you don’t have any calculated members, you should not delete Calculate command.

Apply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>