Let's run Transaction Detail by Account instead of the Sales by customer report to show the prior-year value in QuickBooks Online. This report will show you the details of both debits and credits. Make sure that that you have recorded transactions to the prior year.
Here's how:
Go to the Reports tab on the left side.
Type Transaction Detail by Account in the search field, then enter.
Click the Customize button, then select last year in the Report period.
Choose specific a customer in the Customer drop-down arrow under Filter.
Hit Run Report.
You can also save this report by clicking on Save customization. Once saved, you can access this report in the Custom reports tab in the Reports section. With memorizing reports in QuickBooks, it’ll help you save time since it automatically updates every time there are newly added transactions. For more information, browse this report: Run reports.