Thursday, 15 May 2014

olap - Combine 2 mdx queries -



olap - Combine 2 mdx queries -

i have 2 mdx queries same cube. both utilize same measure different time sets (both time sets same dimension different hierarchies).

i want bring together them in same table results, nowadays 2 measures (cut different sets) , time dimension (“day of week”) uses same time dimension. queries can run separately follows:

fellow member [measures].[avg_6_weeks] [measures].[number of answered comms] /6 select nonempty([comm date utc].[day of week].children) on 0, [measures].[avg_6_weeks] on 1 (select {lastperiods( 42,[comm date utc].[year month day].lastsibling.lastchild.lastchild.lastchild.prevmember )} on 0 comms) ; fellow member [measures].[answered comms] [measures].[number of answered comms] select nonempty([comm date utc].[day of week].children) on 0, [measures].[answered comms] on 1 (select {lastperiods( 7,[comm date utc].[year month day].lastsibling.lastchild.lastchild.lastchild.prevmember )} on 0 comms)

can done? error can’t utilize same time hierarchies in query… idea? sql can bring together 2 views?

thank you

yoni.

the next mdx should that:

with fellow member [measures].[avg_6_weeks] aggregate({lastperiods( 42,[comm date utc].[year month day].lastsibling.lastchild.lastchild.lastchild.prevmember )}, [measures].[number of answered comms] /6 ) fellow member [measures].[answered comms] aggregate({lastperiods( 7,[comm date utc].[year month day].lastsibling.lastchild.lastchild.lastchild.prevmember )}, [measures].[number of answered comms] ) select nonempty([comm date utc].[day of week].children) on 0, { [measures].[avg_6_weeks], [measures].[answered comms] } on 1 comms

i moved context subselects in queries fellow member definition using aggregate function.

mdx olap

No comments:

Post a Comment