# Database Discussions > MDX and Analysis Services >  How can I perform this 'should be easy' calculation?

## imtiazu

Hi all,

This one is driving me nuts and I need a solution asap.
I currently have views created to simulate OLAP star schemas on my SQL server. 

I have a couple of dimensions and a couple of measures and I want to perform a calculation of measure1/measure2 and it should filter this calculation through the rest of the dimension levels... I get this logic, but the problem i have is probably just a bad method. So... here is what the data looks like in the fact and you will see what im on about....

ProductName ProductType Store Quantity Meausure1 Measure2
ProdA           A                A       10         100          50
ProdB           A                B       50         200          0
ProdB           A                A      50         200          0
ProdB           B                A      50         200          100
ProcC           B                B       20         200          0
ProcC           B                B       20         200          0

Now where you see Measure2, I am deliberatly, at the moment, setting the 1st measure to be the value and then all other records that relate to the same producttype to 0 in an attempt to get around my problem.

What I'm trying to acheive is to have all my Measure1's divided by one value (Measure2) to create business calculation which then filters down to the product level and then should aggregate correctly back up (not sum up) but perform the same division at the top level. 

I hope i'm making myself clear, but I am new to Analysis Service and your help and patience would be really appreciated.

Thanks
Immy

----------

