Customization on Sales by customer report

Client needs to get the report to compare the sales per customer this year VS last year

As a solution we customize the standard report, or we can create saved search report to replicate the details.

Standard report customization: We choose the following in the customization settings

  1. Alternate date range Type: Relative to today’s date
  2. Alternate date range: Last year
  3. Range segment month

In this case corresponding year data will be based on the date range and the previous year data will be static showing all the monthly sales last year.

Saved search report:

Last year (2021-nov)sales per customer

CASE WHEN TO_CHAR({trandate}, ‘YYYY’) = ((TO_CHAR({today}, ‘YYYY’)-1)) AND TO_CHAR({trandate}, ‘MM’) = 11 AND {type} IN (‘Credit Memo’, ‘Cash Sale’, ‘Invoice’) THEN {amount} ELSE 0 END

This year (2022-nov)sales per customer

CASE WHEN TO_CHAR({trandate}, ‘YYYY’) = ((TO_CHAR({today}, ‘YYYY’)-0)) AND TO_CHAR({trandate}, ‘MM’) = 11 AND {type} IN (‘Credit Memo’, ‘Cash Sale’, ‘Invoice’) THEN {amount} ELSE 0 END

Leave a comment

Your email address will not be published. Required fields are marked *