Question

What OLAP tools support the dynamic, on the fly, creation of dimensions or hierarchies ?

For example a hierarchy defining members as : 'Top 5' , 'Top 6-10', 'Others'...

Calculated members are the usual answer, I'm looking for something different. The problem with calc. members is performance and consistency (e.g. you can't put the in a slicer or subquery). On top you've to carefully check with all other calc. measures not breaking other calculations (e.g. market shares, time difference)

Was it helpful?

Solution

Within a specific query, any tool that allows you to define your MDX would allow you to use something like this MDX which runs in SSAS on the AdventureWorks cube:

with set [Top 5 Sales] as
         TopCount([Customer].[City].[City].members, 5, [Measures].[Internet Sales Amount])
     set [Top 6-10 Sales] as
         TopCount([Customer].[City].[City].members, 10, [Measures].[Internet Sales Amount]) - [Top 5 Sales]
     set [Others Sales] as
         [Customer].[City].[City].members - TopCount([Customer].[City].[City].members, 10, [Measures].[Internet Sales Amount])
member [Customer].[City].[Top 5] as
     Aggregate([Top 5 Sales], Measures.CurrentMember)
     member [Customer].[City].[Top 6-10] as
     Aggregate([Top 6-10 Sales], Measures.CurrentMember)
     member [Customer].[City].[Others] as
     Aggregate([Others Sales], Measures.CurrentMember)

select { [Measures].[Internet Sales Amount], [Measures].[Internet Order Quantity] }
       on columns,
       non empty
       { [Customer].[City].[All Customers], [Customer].[City].[Top 5] }
       +
       [Top 5 Sales]
       +
       { [Customer].[City].[Top 6-10] }
       +
       [Top 6-10 Sales]
       +
       { [Customer].[City].[Others] }
       +
       Order([Others Sales], [Measures].[Internet Sales Amount], BDESC)
       on rows
  from [Adventure Works]

But I am not aware of a tool that has this functionality out of the box without you to write the MDX. Furthermore, to implement this generically in the cube is difficult, as you need the context of the measure and the attribute on which to work in the specific query - [Measures].[Internet Sales Amount] and [Customer].[City] in my MDX above, which are not available when you define the cube, but only when you have a specific query.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top