Tuesday, 15 July 2014

mdx - Organizing measures dimension as a hierarchy -



mdx - Organizing measures dimension as a hierarchy -

i need/want retrieve measures dimension mondrian schema hierarchy using single mdx query. instance have 2 dimensions (time , company) , 3 measures (cost, income, profit). turn a profit calculated measure profit = income - cost. when perform query like:

select [time].children on columns, crossjoin([measures].members, [company].children) on rows [kpis]

i receive reply like:                                        time measures    company    2010    2011    2012 income        c1               100     123      1                     c2               122     34        10 cost             c1               99       40        50                     c2               42       130      5 profit            c1               1         83      -49                     c2               80       -96       5 result want obtain looks like:                                        time measures    company    2010    2011    2012 - profit         c1               1         83      -49                     c2               80       -96       5     + income c1               100     123      1                     c2               122     34        10     + cost     c1               99       40        50                     c2               42       130      5     

where cost , income children of profit. think there might necessary alter mondrian schema in order specify kid parent relationships between measures.

thank in advance answers!

mdx olap mondrian

No comments:

Post a Comment