Answered Combine into one Set

  • Friday, February 15, 2013 2:49 PM
     
     

    How do i combine the union of 2 members into 1

    Example not real;

    UNION([Person].[Location].&[uk],
    [Person].[Location].&[usa])

    This is output as Row for UK and Row for USA

    Year     2001    2002   2003

    UK        5        7      10

    USA       2       4       5

    How do i change it so it outputs on 1 row

    Year             2001    2002    2003

    UKUSA           7          11        15

All Replies

  • Friday, February 15, 2013 4:40 PM
     
     Answered

    It sounds like you want the sum of these two.

    WITH MEMBER [Person].[Location].[UKUSA] as

    SUM({[Person].[Location].&[uk],
    [Person].[Location].&[usa])})

    SELECT MyMeasure on 0,

    [Person].[Location].[UKUSA] on 1

    from mycube

    cheers,

    Andrew


    Andrew Sears, T4G Limited, http://www.performancepointing.com

  • Monday, February 18, 2013 9:19 AM
    Moderator
     
     Answered

    Hi Glenn,

    Here is an AdventureWorks sample for your reference, please see:
    WITH MEMBER Measures.x AS SUM
       ( { [Date].[Calendar Year].&[2001]
             , [Date].[Calendar Year].&[2002] }
          , [Measures].[Reseller Sales Amount]
        )
    SELECT [Product].[Category].Members ON 0
    ,Measures.x ON 1
    FROM [Adventure Works]

    If you have any feedback on our support, please click here.

    Regards,


    Elvis Long
    TechNet Community Support