## Cube with 120 dimensions !!

### Cube with 120 dimensions !!

> My endeavor to present the business case I face :

> Suppose that I am a salesman of a newspaper company. We have a database
> that has captured most of the customer demographics .... age, income,
> interests in movies, soccer, cars ... say about 40 interests,
> purchasing habits, investing habits etc. ... all those things that you
> normally find on a application/joining form. So its about a 100
> fields.. which I want to convert into dimensions in a cube. "Number of
> customers" would be the measure.

You should consider collecting these attributes together into
dimensions, then populate the dimension with every combination that
appears in the data. The values then become attributes of the dimension,
not measures in the fact table. Try to find the things that correlate
fairly closely, so you don't end up generating N x M x O etc. records.
You don't lose a single bit of data, it is just organized more
tractably.

This is how demographic and similar data is handled in most warehouses.

--

http://www.brad-aisa.com/   -- PGP public key available at:

"The paper wall will be next to fall." -- Brad Aisa

I want to find out all the dimensions in a given cube, and all the
levels in each dimension. I run this query:

with member [Measures].[test] as 'Dimensions(1).uniquename'
member [Measures].[test1] as
'Dimensions(1).levels(0).uniquename'
member [Measures].[test2] as
'Dimensions(1).levels(1).uniquename'
select  {[Measures].[test], [Measures].[test1], [Measures].[test2]} on
columns from [Warehouse and Sales]

which returns:

[Store] [Store].[(All)] [Store].[Country]

However, I need to know how many Dimensions are in the cube, and how
many levels in each dimension. Otherwise, for example, to get all the
dimensions in
[Warehouse and Sales] I would have to keep doing queries with
Dimensions(n), incrementing n until a query failed. How can I find out
what the highest value of n is?

Thank you.