Tuesday, 19 November 2013

Generating Dynamic Sets with Generate Function in MDX

WITH MEMBER [MEASURES].X
AS
"{" +
    GENERATE(
        [Date].[Calendar Year].[Calendar Year].MEMBERS
        ,[Date].[Calendar Year].CURRENTMEMBER.UNIQUENAME
        ,','
        --«Set», «String Expression»[, «Delimiter»]
    )
+ "}"
SELECT
    STRTOSET([MEASURES].X, CONSTRAINED) ON 0
FROM [Adventure Works]

No comments:

Post a Comment