Hi everyone.
I'm having trouble to get a MDX-statement to work and I hope somebody
around here may point me to some helpful tutorials or similar stuff.
To start with, I'm a statistican who is quite familar with SQL queries
but I've not managed yet to create a MDX-statement to calculate a
specific computed measure. Let me explain shortly the setup of my (very
simple) data-cube. It consists of only 6 dimensions. Those are:
- region (9 parameter values, star-scheme)
- age (10 parameter values, star-scheme)
- education (4 parameter values, star-scheme)
- nationality (4 parameter values, star-scheme)
- labour-force status (4 parameter values, star-scheme)
- sex (2 parameter values, star-scheme)
From a sample survey the total population in any of the possible
subgroups is estimated with some (known) weights w. To make a long story
short, the values in the cells of the data-cube are point estimates for
the domain total in the population.
My task is now, to compute a variance estimator with the following
formuar using a MDX-Statement. The variance for a small domain "d"
within a specific region "r" is given by:
Var(total_d) = N^2 * (1-f_r) * (pd*qd)/(n-1)
with
- N... total population size (sum of estimated totals over all regions)
- n_r...sample size for region r
- f_r...sample fraction, which is different for each region. It can be
calculated as: n_r/N; where n_r is the number of objects in the
sample that belong to region
- nd... number of sample objects in small domain "d"
- pd... nd / n_r
- qd ...= 1-pd
My problem is that I have no clue how to create an MDX-Statement that
calculates the variance values simultanely for all the cells that are
returned as a result set from the data-cube.
I'd be very glad if someone has some hints for me. Really, and I'd
happily pay lots of beer of stuff for the one who may guide me to a
successfull MDX-statement
Greetings,
Bernhard