Skip to main content

XIRR - chart function

XIRR()returns the aggregated internal rate of return for a schedule of cash flows (that is not necessarily periodic) represented by paired numbers in the expressions given by pmt and date iterated over the chart dimensions. All payments are discounted based on a 365-day year.


XIRR([TOTAL [<fld {,fld}>]] pmt, date)

Return data type: numeric


Argument Description

Payments.The expression or field containing the cash flows corresponding to the payment schedule given in date.

date The expression or field containing the schedule of dates corresponding to the cash flow payments given in pmt.

If the word TOTAL occurs before the function arguments, the calculation is made over all possible values given the current selections, and not just those that pertain to the current dimensional value, that is, it disregards the chart dimensions.

By using TOTAL [<fld {.fld}>], where the TOTAL qualifier is followed by a list of one or more field names as a subset of the chart dimension variables, you create a subset of the total possible values.

Defining the aggregation scope


pmt and date must not contain aggregation functions, unless these inner aggregations contain the TOTAL qualifier. For more advanced nested aggregations, use the advanced aggregation function Aggr, in combination with calculated dimensions.

Text values, NULL values and missing values in any or both pieces of a data-pair result in the entire data-pair being disregarded.

Examples and results:  

Example Result
XIRR(Payments, Date)


Data used in examples:


LOAD 2013 as Year, * inline [






] (delimiter is '|');