• hi yayomayn

    I did some more investigative trial and error stuff and have now got it to work with the subselect. In the subselect the default measure is "internet sales" so need to specify it. What I did was to put an extra member of YearCount. Again in my opinion since the subselect acts a complete "guillotine" it should have only have one year in it. Which when I display it shows the one year 2006. However the count says 4. This got me scratching my head...its only when I wrapped the "existing" function around the count did it come out as 1. Then the penny dropped the existing is forcing the the members in context of the subcube. The mdx is now as follows

    WITH

    MEMBER [Measures].[MinValue] AS MIN(Existing([Order Date].[CalendarHierarchy].[Year].Members, [Measures].[Sales Amount])), FORMAT_STRING = '0'

    MEMBER [Measures].[MaxValue] AS MAX(Existing([Order Date].[CalendarHierarchy].[Year].Members, [Measures].[Sales Amount])), FORMAT_STRING = '0'

    MEMBER [Measures].[YearCount] AS Count(Existing([Order Date].[CalendarHierarchy].[Year].Members))

    SELECT

    {[Measures].[Sales Amount],[Measures].[MinValue],[Measures].[MaxValue], [Measures].[YearCount]} ON 0,

    [Order Date].[CalendarHierarchy].[Year].Members ON 1

    FROM

    (

    SELECT

    [Order Date].[Calendar Year].&[2006] ON 0

    FROM MyFirstCube

    )

    and the results are :

    YearSales AmountMinValue MaxValue YearCount

    20066530343 6530344 6530344 1

    without the "existing" function wrapper around the members we have

    YearSales AmountMinValue MaxValue YearCount

    20066530343 3266374 9791060 4

    food for thought ...My opinion is still the existing should not have to be used...but there you go..any way been a pleasure to discuss it with you my friend