带有交叉连接的MDX查询示例

时间:2013-08-07 06:42:02

标签: mdx

select NON EMPTY 
    Crossjoin(
                {   [DateYYYY].[All].[2012], 
                    [DateYYYY].[All].[2013]
                } ,
                Crossjoin(
                                {
                                    [DateQQ].[All].[Q1], [DateQQ].[All].[Q2], 
                                    [DateQQ].[All].[Q3], [DateQQ].[All].[Q4]
                                } ,
                                Crossjoin
                                (
                                        {
                                                [DateMMM].[All].[JAN], [DateMMM].[All].[FEB], [DateMMM].[All].[MAR], [DateMMM].[All].[APR] ,
                                                [DateMMM].[All].[MAY], [DateMMM].[All].[JUN], [DateMMM].[All].[JUL], [DateMMM].[All].[AUG] ,
                                                [DateMMM].[All].[SEP], [DateMMM].[All].[OCT], [DateMMM].[All].[NOV], [DateMMM].[All].[DEC]
                                        },
                                        {
                                            [DateWeekofMonth].[All].[1], 
                                            [DateWeekofMonth].[All].[2], 
                                            [DateWeekofMonth].[All].[3], 
                                            [DateWeekofMonth].[All].[4],
                                            [DateWeekofMonth].[All].[5]
                                        }
                                )
                          )
            )
            ON ROWS,
    NON EMPTY Hierarchize
        (
            Union(
                    {
                        [SrcH130].[All-Mem]
                    }, 
                        [SrcH130].[All-Mem].Children
                )
        ) ON COLUMNS
from [Connections]

如何在Where子句中传递[YearYYY]和[MonthMMM]等?

0 个答案:

没有答案