This issue occurs because the option of less sales on credit note date is not selected. To fix this:
Go to Setup, General Setup, Stock Valuation, Treatment of credit note on sales.
Select the option of Less sales on credit note date.
Click OK.
Go to Reports, Customers & Sales, Sales - By Month, Customer, tick Include DN/CN.
Click OK.
