Forum Discussion

TorsteinZahl's avatar
TorsteinZahl
Frequent Visitor
4 years ago
Solved

XIRR with date table will not work properly

I have an issue with Star Modelling my XIRR Formula.. I can't simply get it to work.. I have tried and tried, so decided to ask here.    My Fact data is:   My Relationsship with dates are l...
  • Anonymous's avatar
    Anonymous
    4 years ago

    HI TorsteinZahl,

    I think this should be related to your filter, one or more records have been filtered on your visual.
    Then XIRR function will process the filtered records which include blank parts at 'value' and 'date' arguments. (these values should not be suitable for the function calculation)

    Measure concatenate current 'Previous Quarter Value in Minus' and date field values:

    Fixed measure formal with the condition and alternate results:

    XIRR = 
    VAR currDate =
        MAX ( fact_values[Date] )
    VAR currPQ = [Previous Quarter Value in Minus]
    RETURN
        IF (
            AND ( currPQ <> BLANK (), currDate <> BLANK () ),
            XIRR ( fact_values, [Previous Quarter Value in Minus], [Date] ,,BLANK())
        )

    Regards,

    Xiaoxin Sheng