Hello,
First, thank you so much for this wonderful sheet. It is amazing. I have been testing it out and I think there may be an issue with the sales capital gain under the Sales tab. I am comparing the reported gain to the reported capital gain in adjustedcostbase.ca using the same transaction information and I believe the Portfolio Slicer is under-reporting the capital gains.
Looking at the equation is it possible the sales fee is being subtracted twice? Is it not already being taken into consideration during the sales amount.
=Report[Sales Amnt] - Report[Sales Cost Basis] - Report[Sales Fees]
- CALCULATE(SUM(Trans[AccruedInterest])
, TransType[BookValueSign]=-1
)
Comments
Thanks for reporting this! I just tested what you reported and I believe that you are right - there is a bug.
Formula should be: There should be "+ Report[Sales Fees]", so + instead of -.
I am sorry about this bug! And thank you very much for reporting it!
Can you edit your formula?
Thank you for taking a look. Since the sales fee is deducted in the sales amnt, I think by adding it back in (via
+ Report[Sales Fees]
) the capital gain would be higher than it should be. Would the correct formula be:I believe you are from Canada, as you are comparing results to adjustedcostbase.ca. When we file taxes, for each symbol sale we need to specify "Sales Capital Gain" and "Sales Fees". In that context "Sales Capital Gain" is calculated BEFORE "Sales fees" - that is why I am making an adjustment for "Sales Fees". So basically I am using that report while filing taxes.
You are right that normally you would expect that "Sales Capital Gain" would also account for "Sales Fees".
Does that make sense?
Also - you can add "Capital Gain" measure that will behave as you expected - the difference is that "Sales Capital Gain" does adjustment for "Sales Feel".
Thanks again for reporting this issue - it will be fixed in the next release!
I also seem a bit lost...where can I see the actual formulas in the workbook? I normally consider myself fairly savvy in Excel, but I've not worked with a spreadsheet like this before!
Great work BTW.
In Portfolio Slicer Sales Amnt formula is: That is roughly equal to SaleValue-SellCommission, where SaleValue=QtySell*ShareSellPrice
Corrected Sales Capital Gain formula is: This is equal to SalesAmount - SalesCostBasis + SalesCommission
I am adding back SalesCommission to SalesCapitalGain as it is reported separately in your tax form and subtracted from your profit/loss there.
=CALCULATE(SUMX(Trans, (ROUND([TotalAmnt] * Related(TransType[CashImpactSign]), 2)) * Report[TransReportExchRate] + Report[Sales Fees])
, TransType[SellFlag]=1
)
Current Sales Amnt formula: That formula already excludes sales fees. To include sales fees you would do following: