Currently, QuickBooks packages don't have profit analysis per invoices basis. I recommend using third-party applications to achieve this functionality.
Additionally, we have several Profit and Loss reports for each QuickBooks package. Advanced and Plus subscriptions have 10 P&L reports, Simple Start has 8, and Essential has 9. These reports provide a summary of the financial health and status of a business
Moreover, you can refer to this article to learn how to manage your invoices in QuickBooks Online: