Create a saved search to display the total of sales amount form current month to date last year and this year.

Scenario: Saved search to display the total of sales amount form current month to date last year and this year considering sales orders.

Solution:

List> Search> Saved Searches

Select Transactions
Enter Search Title
Criteria:
Type: Sales Order
Main line: False
Tax line: False
COGS: False
Shipping: False
Results:
Field: Documents number, Summary Type: Group
Field: Formula(Currency), Summary Type: (Sum): CASE WHEN TO_CHAR({trandate}, ‘YYYY’) = TO_CHAR({today}, ‘YYYY’) – 1 AND TO_CHAR({trandate}, ‘MM’) = TO_CHAR({today}, ‘MM’) AND TO_CHAR({trandate}, ‘DD’) <= TO_CHAR({today}, ‘DD’) THEN {amount} ELSE NULL END
Label: Month to Date Previous Year
Formula (Currency),Summary Type: Sum
Formula: CASE WHEN TO_CHAR({trandate}, ‘YYYY’) = TO_CHAR({today}, ‘YYYY’) AND TO_CHAR({trandate}, ‘MM’) = TO_CHAR({today}, ‘MM’) AND TO_CHAR({trandate}, ‘DD’) <= TO_CHAR({today}, ‘DD’) THEN {amount} ELSE NULL END
Label: Month to Date This Year

Click Save

Leave a comment

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