• Geez I hate maths....

    I got it to work but not being overly into stats, I can't say that this is actually going to help....Anyways, here's the code, a simple example from Foodmart. I used a static value of '2' for the x value in the y = ax + b, not sure if this is what you wanted. Note also the SOLVE_ORDER statement for the calc member, not having this value definitely makes a difference in the return values, in particular, if you have other calc members in the measures dimension, these will potentially solve before/after this calc member.

    WITH MEMBER

    [Time].[1997].[Q1].[bob] AS

    'LinRegPoint(2,{[Time].[1997].[Q1].Children},[Measures].[Store Sales])', SOLVE_ORDER = 2

    SELECT

    ADDCALCULATEDMEMBERS({[Time].[1997].[Q1].children}) on 0,

    ADDCALCULATEDMEMBERS({[Measures].Members}) on 1

    FROM Sales

    I hope this helps... Can you predict future stock values now? 😛

    Also, for anyone else maybe wanting to check that KB article, its 307267 not 30267 as noted above.

    Steve

    Edited by - stevefromOZ on 08/06/2003 07:06:36 AM

    Steve.