简体   繁体   中英

XIRR function in pivot table

I'm trying to add XIRR formula to pivot table but either I'm doing something wrong, either it's impossible.

Here on the picture is sample data, formula I've put and XIRR calculated in single cell with the same data (so It works outside pivot table)

在此处输入图像描述

I don't think so as the calculated field cannot work with arrays and will sum across the underlying data.

在此处输入图像描述

Look at how SUMPRODUCT misbehaves due to summing underlying data:

数据透视计算字段中的 SUMPRODUCT click image to enlarge

Pivottable calculated fields will operate on the underlying data and the XIRR function needs at least one negative and one positive value, which it wouldn't have with the summed underlying data.

As per Microsoft XIRR guidance :

XIRR expects at least one positive cash flow and one negative cash flow; otherwise, XIRR returns the #NUM. error value.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM