Home Forums Data Warehousing Analysis Services Different aggreation results with and without a dummy WITH clause RE: Different aggreation results with and without a dummy WITH clause

  • Ah yes I am a Doctor Who fan, but I wasn't referencing the mastermind behind the Daleks! It's a fine line between economic forum and creatures genetically altered to be evil incarnate, but I digress.

    I can see you're scoping the calcs for both hierarchies, avoiding the ALL member trap by using descendents, very good. I am not familiar with using iserror in MDX. I've read a little and it seems to be useful for missing members. I am wondering if something has happened to the 2004/2005 member when you've reprocessed the cube.

    The comments you've written in there regarding why you are using iserror (selecting multiple members) confuses me. CurrentMember always expects a member, not a tuple or a set so when would it be applied to multiple members and error? Yes please explain that part. I don't think the iserror is the problem though.

    To rule out the iserror you could try a query like this (sorry I haven't checked syntax here, might need to add a sensible format to the calculated measure)

    --Note, try some different combinations of the measures in this query, particularly the two non-calculated measures by themselves that make up the calculated measure (Aquisitions & growth).

    WITH [Measures].[Net Lost Commitments (during period) TEST ISERROR] as

    iif(iserror([Date Dimension].[Fiscal Year Hierarchy].CurrentMember)

    , 1

    , 0)

    [Measures].[Net Lost Commitments (during period) TEST CALC] as

    ([Measures].[Acquisitions (during period)] - [Measures].[Growth in Commitments (during period)])

    select

    [Measures].[Acquisitions (during period)]

    ,[Measures].[Growth in Commitments (during period)]

    ,[Measures].[Net Lost Commitments (during period) TEST ISERROR]

    ,[Measures].[Net Lost Commitments (during period) TEST CALC]

    ,[Measures].[Net Lost Commitments (during period)]

    on columns

    , {[Date Dimension].[Fiscal Year].[Fiscal Year].[2004\05],[Date Dimension].[Fiscal Year].[Fiscal Year].[2005\06]} on rows

    from Compass3

    More questions:

    Do you get any error when using the Calendar hierarchy against the calculated measure? I realise the members will be different but I'm curious if any of those calendar year members are null.

    Stepping back earlier in the process, if you query the datawarehouse (I'm assuming you have one) directly for fiscal years in your calendar table and the two facts ([Measures].[Acquisitions (during period)] AND [Measures].[Growth in Commitments (during period)]) that make up the calculation, can you confirm all the data is there for that 2004/2005 year? All the data is clean?