Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Team, I am trying to sum an array of cash flows including several filters. Here is my initial formula but I need to exclude the last cashflow activity which I can do excluding a date. Thanks for your help.
Interpretation: sum all cashflows, cashflows greater than zero, allexcept a date (this is the part that is not working),filter company names included in both tables (Summary3 and NewCF2)
'=CALCULATE(SUM(NewCF2[Cashflow$]), NewCF2[Cashflow$]>0,ALLEXCEPT(NewCF2,(NewCF2[Date])),filter(
ALL(NewCF2),
CONTAINS(
VALUES(Summary3),Summary3[Portfolio Company],NewCF2[Company])
)
)'
Solved! Go to Solution.
@Greg_Deckler I found out that I had last cashflow activities with the same date (last date) as the end of the period balance (which is calculated at the last date). Therefore, I decided to create a two columns: column 1 ($ activities), column 2 (end of the month balance). This solved one problem but I have two more problems. Below I pasted two tables and a screenshots of the measeures I created.
1) The first challenge I have is a measure totals problem (see last screen shot belo) that may be solved with HASONEFILTER. I tried implementing it in the Loss Amount Measure but not sure I did it right. (see #1 and #2)
2) The second challenge is that a measure I created (XIRR) is resulting in inconsistent results (see #3 and #4). For all the companies except Sym the measure seems to be working. I check the data and it seems to be fine as well but when I do a simple xirr calculation outside of the pivot table I get -69% but the pivot table doesn't. Hopefully this is in the scope of your expertise. Thanks for your help!.
Here are the measures created:
Here are the 2 tables:
testsum
TestCF
Here is the output:
@Greg_Deckler I found out that I had last cashflow activities with the same date (last date) as the end of the period balance (which is calculated at the last date). Therefore, I decided to create a two columns: column 1 ($ activities), column 2 (end of the month balance). This solved one problem but I have two more problems. Below I pasted two tables and a screenshots of the measeures I created.
1) The first challenge I have is a measure totals problem (see last screen shot belo) that may be solved with HASONEFILTER. I tried implementing it in the Loss Amount Measure but not sure I did it right. (see #1 and #2)
2) The second challenge is that a measure I created (XIRR) is resulting in inconsistent results (see #3 and #4). For all the companies except Sym the measure seems to be working. I check the data and it seems to be fine as well but when I do a simple xirr calculation outside of the pivot table I get -69% but the pivot table doesn't. Hopefully this is in the scope of your expertise. Thanks for your help!.
Here are the measures created:
Here are the 2 tables:
testsum
TestCF
Here is the output:
@giordani2000 Try setting a VAR __MaxDate = MAX('Table'[Date]) and then using that in your filter clause?