Results 1 to 3 of 3

Thread: MDX - TopCount

  1. #1
    Join Date
    May 2007
    Posts
    1

    MDX - TopCount

    Necessary to demonstrate Sales for the 10 bigger Customers and the addition of the remain.
    For example:
    Customer 1 ..... 10000
    Customer 2 ..... 11000
    Customer 3 ..... 12000
    Customer 4 ..... 13000
    Customer 10 ..... 14000
    Others ..... 9000

    I obtained through of the TopCount to search the 10 greaters, but I do not have idea of as to obtain "Others" in my MDX.

    Thanks,

    Silvana

  2. #2
    Join Date
    Aug 2009
    Posts
    2
    WITH
    SET Top10Countries AS TopCount(EXCEPT([Customer].[Country-Region].Members,[Country-Region].[All Customers]),10,[Internet Sales-Sales Amount])
    MEMBER[Customer].[Country-Region].[All Others] AS
    Aggregate(Except(Except([Customer].[Country-Region].Members,Top10Countries),[Country-Region].[All Customers]))
    SELECT
    {[Internet Sales-Sales Amount]} ON 0,
    {Top10Countries,[All Others]} ON 1
    FROM [AdwentureWorks]

  3. #3
    Join Date
    Jun 2004
    Location
    Atlanta and Manhattan
    Posts
    607

    Thanks for posting the solution ...

    Nice and efficient ...

    Bill

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •