# Financial aggregation functions

This section describes aggregation functions for financial operations regarding payments and cash flow.

Use the drop-down on each function to see a brief description and the syntax of each function. Click the function name in the syntax description for further details.

## Financial aggregation functions in the load script

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/FinancialAggregationFunctions/financial-aggregation-functions-script.htm)

#### IRR

IRR() returns the aggregated internal rate of return for a series of cash flows represented by the numbers in the expression iterated over a number of records as defined by a group by clause.

[**IRR**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/FinancialAggregationFunctions/IRR.htm)(expression)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/FinancialAggregationFunctions/financial-aggregation-functions-script.htm)

#### XIRR

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

[**XIRR**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/FinancialAggregationFunctions/XIRR.htm)(pmt, date)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/FinancialAggregationFunctions/financial-aggregation-functions-script.htm)

#### NPV

NPV() returns the aggregated net present value of an investment based on a constant discount\_rate per period and a series of future payments (negative values) and incomes (positive values), represented by the numbers in value, iterated over a number of records, as defined by a group by clause. The payments and incomes are assumed to occur at the end of each period.

[**NPV**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/FinancialAggregationFunctions/NPV.htm)(discount\_rate, value)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/FinancialAggregationFunctions/financial-aggregation-functions-script.htm)

#### XNPV

XNPV() returns the aggregated net present value for a schedule of cashflows (not necessarily periodic) represented by paired numbers in pmt and date, iterated over a number of records as defined by a group by clause. Rate is the interest rate per period. All payments are discounted based on a 365-day year.

[**XNPV**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/FinancialAggregationFunctions/XNPV.htm)(discount\_rate, pmt, date)

## Financial aggregation functions in chart expressions

These financial aggregation functions can be used in charts.

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/FinancialAggregationFunctions/financial-aggregation-functions-script.htm)

#### IRR

IRR() returns the aggregated internal rate of return for a series of cash flows represented by the numbers in the expression given by value iterated over the chart dimensions.

[**irr**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FinancialAggregationFunctionsInCharts/irr.htm)([TOTAL [&lt;fld {,fld}&gt;]] value)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/FinancialAggregationFunctions/financial-aggregation-functions-script.htm)

#### NPV

NPV() returns the aggregated net present value of an investment based on a discount\_rate per period and a series of future payments (negative values) and incomes (positive values,) represented by the numbers in value, iterated over the chart dimensions. The payments and incomes are assumed to occur at the end of each period.

[**npv**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FinancialAggregationFunctionsInCharts/npv.htm)([TOTAL [&lt;fld {,fld}&gt;]] discount\_rate, value)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/FinancialAggregationFunctions/financial-aggregation-functions-script.htm)

#### XIRR

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**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FinancialAggregationFunctionsInCharts/xirr.htm)([TOTAL [&lt;fld {,fld}&gt;]] pmt, date)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/FinancialAggregationFunctions/financial-aggregation-functions-script.htm)

#### XNPV

XNPV() returns the aggregated net present value for a schedule of cash flows (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.

[**xnpv**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FinancialAggregationFunctionsInCharts/xnpv.htm)([TOTAL [&lt;fld{,fld}&gt;]] discount\_rate, pmt, date)