Scenario
This search will show the quantity sold of the items on the last months in another column.
Solution
- Navigate to Lists > Searches > All Saved Searches
- Edit the existing search
- On the Results Tab, under Columns subtab, add the following fields:
Field = Formula(Numeric) | Summary Type = Sum | Function = Round | Formula = CASE WHEN {transaction.trandate} between add_months({today},-n) and {today} and {transaction.type}='Invoice' then {transaction.quantity} end | Custom Label = **Desired Name of the column
Change n to the number of periods/months you want to be covered on the calculation. - Set Summary Type of all non numeric fields to Group (e.g. Name, Display Name, Description, etc..)
- Save & Run