Skip to Main Content

@CalcMgrExcelXIRR with @XRANGE

User_LAVQSJan 18 2022

Hi,
I am trying to implement excel's XIRR function using @CalcMgrExcelXIRR. When I run this function within the year (using XRange) it works fine. For Example:
@CalcMgrExcelXIRR(
@REMOVE(@XRANGE("FY21" -> "[YearTotal].[Jul]" -> "FinDev_DevIRR_TotalCF", "FY21" -> "[YearTotal].[Jun]" -> "FinDev_DevIRR_TotalCF"), "FY21" -> "BegBalance" -> "FinDev_DevIRR_TotalCF"),
@REMOVE(@XRANGE("FY21" -> "[YearTotal].[Jul]" -> "FinDev_PeriodEndDate_Excel", "FY21" -> "[YearTotal].[Jun]" -> "FinDev_PeriodEndDate_Excel"), "FY21" -> "BegBalance" -> "FinDev_PeriodEndDate_Excel")
, 0.2
);

but it does not work and return 0 when I cross over the year in XRange function (code as below).

@CalcMgrExcelXIRR(
@REMOVE(
@REMOVE(@XRANGE("FY21" -> "[YearTotal].[Jul]" -> "FinDev_DevIRR_TotalCF", "FY22" -> "[YearTotal].[Jun]" -> "FinDev_DevIRR_TotalCF"),
"FY21" -> "BegBalance" -> "FinDev_DevIRR_TotalCF" ), "FY22" -> "BegBalance" -> "FinDev_DevIRR_TotalCF"),

@REMOVE(
@REMOVE(@XRANGE("FY21" -> "[YearTotal].[Jul]" -> "FinDev_PeriodEndDate_Excel", "FY22" -> "[YearTotal].[Jun]" -> "FinDev_PeriodEndDate_Excel"),
"FY21" -> "BegBalance" -> "FinDev_PeriodEndDate_Excel"),"FY22" -> "BegBalance" -> "FinDev_PeriodEndDate_Excel")
, 0.2);

In 2nd code example, I removed "YearTotal" as well but no luck. I have tried 2nd code with only 1 Remove instead of 2 but still no luck.
Along with removing BegBalabce, I have also tried removing "YearTotal" (using @List) but still no luck.

Any help appreciated.

Thanks,
Sid

Comments