Scenario
User needs to display in its custom saved search the total gross profit percentage per item based on the item’s total revenue.
Solution
- Navigate to List > Search > Saved Searches > New
- Click Transaction
- Search Title: Enter Title preferred
- Click Criteria
- Click Standard
- Filter:
- Select Posting
- Select Yes
- Click Set
- Click Add
- Click Summary
- Summary Type: Select Average
- Field: Select Formula (Percent)
- Formula: Enter Round(sum(case when {accounttype} in ('Income','Cost of Goods Sold') then nvl({grossamount},0) else 0 end)/nullif(sum(case when {accounttype} = 'Income' then nvl({grossamount},0) else 0 end),0),4)
- Description: Select Is not empty
- Click Results
- Click Columns
- Field:
- Select Item
- Summary Type: Select Group
- Select Formula (Percent)
- Summary Type: Select Average
- Formula: Enter Round(sum(case when {accounttype} in ('Income','Cost of Goods Sold') then nvl({grossamount},0) else 0 end)/nullif(sum(case when {accounttype} = 'Income' then nvl({grossamount},0) else 0 end),0),4)
- Click Save & Run