![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
| SELECT |
|
Iam new to MDX queries & exploring possibilities of solving a problem that iam currently facing. Now assume that there is a time dimension with 3 levels Year,Quarter,month respectively. Now i have a set something like this [2005].[Quarter 4].[October],[2005].[Quarter 4].[November],[2005].[Quarter 4].[December] Now i want to get just [2005].[Quarter 4] using a MDX query. This is to find out if all months are coming in a quarter or not. Then i jst need that [2005].[Quarter 4] string from the query. This is just an example what i have given Basically it should rollup till a level when all child members are available at that level. |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
Hi Darren, First of all Thanks, fr your reply. Actually iam working on AS2000 server & iam not able to run your sample query as i have foodmart2000 sample DB. But iam able to figure out what exactly u r trying to do is to assume a level up to which the member set should rollup to. In my case i do not know to which level it should rollup. Time dimension was just an example i gave to so my problem can be understood easily. The mdx query should rollup to a level with that level hierarchy ([parent1].[child1]) if all members below this level are available For example assume at this level there are 1 sublevel with 2 more members. Then the set would be {[parent1].[child1].[child11],[parent1].[child1].[child12]} With just the above data from a mdx query i should be able to get somehow '[parent1].[child1]' value without specifying any level names Please let me know if iam clear about my problem Pavan |
#5
| |||
| |||
|
| WITH |
|
Hi Darren, First of all Thanks, fr your reply. Actually iam working on AS2000 server & iam not able to run your sample query as i have foodmart2000 sample DB. But iam able to figure out what exactly u r trying to do is to assume a level up to which the member set should rollup to. In my case i do not know to which level it should rollup. Time dimension was just an example i gave to so my problem can be understood easily. The mdx query should rollup to a level with that level hierarchy ([parent1].[child1]) if all members below this level are available For example assume at this level there are 1 sublevel with 2 more members. Then the set would be {[parent1].[child1].[child11],[parent1].[child1].[child12]} With just the above data from a mdx query i should be able to get somehow '[parent1].[child1]' value without specifying any level names Please let me know if iam clear about my problem Pavan |
#6
| |||
| |||
|
#7
| |||
| |||
|
|
Hi Pavan and Darren, This problem sounds similar to the "Tuning YTD-style calculations" discussion in Chris Webb's blog: http://spaces.msn.com/members/cwebbbi/Blog/cns!1pi7ETChsJ1un_2s41jm9Iyg! 107.entry http://spaces.msn.com/members/cwebbbi/Blog/cns!1pi7ETChsJ1un_2s41jm9Iyg! 111.entry - Deepak Deepak Puri Microsoft MVP - SQL Server *** Sent via Developersdex http://www.developersdex.com *** |
![]() |
| Thread Tools | |
| Display Modes | |
| |