Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

IRR error

Dear All,   I want to calculate the IRR but when I try to I get an error. What do I do wrong?   I used the following code: ROLLING IRR = VAR minIndex = CALCULATE ( MIN ( 'TEST - Working Capi...
  • amitchandak's avatar
    amitchandak
    4 years ago

    Anonymous , I see need of one change, if this a measure then we need max in place of earlier

     

    ROLLING IRR =
    VAR minIndex =
    CALCULATE ( MIN ( 'TEST - Working Capital'[Index] ), ALL ( 'TEST - Working Capital' ) )
    RETURN
    IF (
    'TEST - Working Capital'[Index] > minIndex && NOT(ISBLANK('TEST - Working Capital'[Data])),
    CALCULATE (
    XIRR (
    'TEST - Working Capital',
    'TEST - Working Capital'[Cash flow amount],
    'TEST - Working Capital'[Transaction Date]
    ),
    FILTER (
    allselected('TEST - Working Capital'),
    MAx ( 'TEST - Working Capital'[Index] ) >= 'TEST - Working Capital'[Index]
    )
    )
    )

     

    Trying to check in a file