locked
Unable to invoke XNPV function RRS feed

  • Question

  •  

    Hi All.

     

    I'm trying to invoke XNPV function from ExcelMDx assembly:

     

    WITH

     

    MEMBER measures.xnpv as

    Excel.XNPV(

    0.1,

    SetToArray([Date].[Calendar].[Month].Members,[Measures].[Internet Sales Amount]),

    SetToArray([Date].[Calendar].[Month].Members , [Date].[Calendar].[Month].&[2003]&[4].MemberValue)

    )

    SELECT

    {[Measures].[xnpv]

    ,[Measures].[Internet Sales Amount]} ON 0,

    [Date].[Calendar].[Month].&[2003]&[4]:[Date].[Calendar].[Month].&[2003]&Devil ON 1

    FROM [adventure works];

     

    This query ends with: "Incorrect number of argument".

     

    It seems that SSAS can access function, but something wrong with number of params.  I can call NPV function without any problems. The main diffrenece between NPV and XNPV is that XNPV required date params.

     

    I have no idea how to pass date param.  

     

    Any help will be appreciated...

     

     

    Wednesday, July 2, 2008 6:04 AM