Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.