# 財務彙總函數

本節說明有關付款和現金流之財務運作的彙總函數。

使用每個函數中的下拉式功能表，以查看每個函數的簡要描述及語法。按一下語法描述中的函數名稱，以取得進一步詳細資料。

## 資料載入指令碼中的財務彙總函數

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/Scripting/FinancialAggregationFunctions/financial-aggregation-functions-script.htm)

#### IRR

IRR() 會針對由 group by 子句所定義之若干記錄上反覆運算的運算式中數字所代表的一組現金流量，傳回彙總的內部報酬率。

[**IRR**](https://help.qlik.com/zh-TW/sense/May2025/Subsystems/Hub/Content/Sense_Hub/Scripting/FinancialAggregationFunctions/IRR.htm)(expression)

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/Scripting/FinancialAggregationFunctions/financial-aggregation-functions-script.htm)

#### XIRR

XIRR() 會針對由 group by 子句所定義之若干記錄上反覆運算的配對數字 pmt 和 date 所代表的現金流量排程 (不一定是定期)，傳回彙總的內部報酬率 (每年)。 所有支出均按照 1 年 365 天攤算。

[**XIRR**](https://help.qlik.com/zh-TW/sense/May2025/Subsystems/Hub/Content/Sense_Hub/Scripting/FinancialAggregationFunctions/XIRR.htm)(valueexpression, dateexpression )

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/Scripting/FinancialAggregationFunctions/financial-aggregation-functions-script.htm)

#### NPV

NPV() 指令碼函數採用折扣率和依期間排序的多個值。對於這些計算，流入量 (收入) 為正值，而流出量 (未來付款) 假設為負值。這發生在每個期間結束時。

[**NPV**](https://help.qlik.com/zh-TW/sense/May2025/Subsystems/Hub/Content/Sense_Hub/Scripting/FinancialAggregationFunctions/NPV.htm)(rate, expression)

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/Scripting/FinancialAggregationFunctions/financial-aggregation-functions-script.htm)

#### XNPV

XNPV() 會針對配對數字 (以 pmt 和 date 表示) 所代表的現金流量排程 (不一定是定期)，傳回彙總淨現值。 所有支出均按照 1 年 365 天攤算。

[**XNPV**](https://help.qlik.com/zh-TW/sense/May2025/Subsystems/Hub/Content/Sense_Hub/Scripting/FinancialAggregationFunctions/XNPV.htm)(rate, valueexpression, dateexpression)

## 圖表運算式中的財務彙總函數

這些財務彙總函數可用於圖表中

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/Scripting/FinancialAggregationFunctions/financial-aggregation-functions-script.htm)

#### IRR

IRR() 會針對圖表維度上反覆運算的運算式中的數字 (以 value 表示) 所代表的一組現金流量，傳回彙總的內部報酬率。

[**irr**](https://help.qlik.com/zh-TW/sense/May2025/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FinancialAggregationFunctionsInCharts/irr.htm)[TOTAL [&lt;fld {,fld}&gt;]] value)

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/Scripting/FinancialAggregationFunctions/financial-aggregation-functions-script.htm)

#### NPV

NPV() 會根據圖表維度上反覆運算的數字 (以 value 表示) 代表的各期間的 discount\_rate 以及一系列未來支出 (負值) 和收入 (正值)，傳回投資的彙總淨現值。支出與收入假設於每個期間的末尾發生。

[**npv**](https://help.qlik.com/zh-TW/sense/May2025/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FinancialAggregationFunctionsInCharts/npv.htm)([TOTAL [&lt;fld {,fld}&gt;]] discount\_rate, value)

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/Scripting/FinancialAggregationFunctions/financial-aggregation-functions-script.htm)

#### XIRR

XIRR() 會針對圖表維度上反覆運算的運算式的配對數字 (以 pmt 和 date 表示) 所代表的現金流量排程 (不一定是定期) 傳回彙總的內部報酬率 (每年)。 所有支出均按照 1 年 365 天攤算。

[**xirr**](https://help.qlik.com/zh-TW/sense/May2025/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FinancialAggregationFunctionsInCharts/xirr.htm)([TOTAL [&lt;fld {,fld}&gt;]] pmt, date)

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/Scripting/FinancialAggregationFunctions/financial-aggregation-functions-script.htm)

#### XNPV

XNPV() 會針對圖表維度上反覆運算的運算式的配對數字 (以 pmt 和 date 表示) 所代表的現金流量排程 (不一定是定期) 傳回彙總淨現值。 所有支出均按照 1 年 365 天攤算。

[**xnpv**](https://help.qlik.com/zh-TW/sense/May2025/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FinancialAggregationFunctionsInCharts/xnpv.htm)([TOTAL [&lt;fld{,fld}&gt;]] discount\_rate, pmt, date)