Monday, October 15, 2018

Previous Rolling Week date range on Saved Search using a formula

Help article: Date Ranges for Reports does not include Previous Rolling Week.
Date Range: Previous Rolling Week
Definition: One full week until today
From-To: July 11, 2011 - July 17, 2011
As of: July 17, 2011


Sample saved search:
1. Navigate to Lists > Search > Saved Searches > New.
2. Enter Search Title.
3. Click Case.
4. Click Criteria tab.
5. Click Standard sub tab.
6. Select Formula (Numeric) under the Filter column.
7. Enter the formula below on the Formula field:
CASE WHEN {createddate} BETWEEN ({today}-6) AND {today} THEN 1 ELSE 0 END
8. Set the Formula (Numeric) to equal to.
9. Set Value to 1.
10. Click Set.
11. Add Stage is any of Open, Escalated.
12. Click on the Results tab.
13. Click Columns sub tab.
14. Click Remove All button
15. Click on Field column to add Assigned To.
16. Click on the next line to add Number.
17. Click on the next line to add Date Created.
18. Click on the next line to add Last Modified.
19. Click on the next line to add Formula (Text).
20. Enter the formula below under Formula column:
(SUBSTR(({today}-{createddate}), 0, ((INSTR(({today}-{createddate}), '.', 1))-1))) || ' ' || 'days' || ' ' || (ROUND((({today}-{createddate}) - TO_NUMBER(SUBSTR(({today}-{createddate}), 0, ((INSTR(({today}-{createddate}), '.', 1))-1))))*24)) || ' ' || 'hrs.'
21.Type in Time under Custom Label column.
22. Click on the next line to add Stage.
23. Click on the next line to add Company.
24. Set the Sort By field to Assigned To.
25. Click Save & Run.

Result: If today = July 17, 2011, the saved search result should show all open cases created from July 11, 2011 to July 17, 2011.


The result should also have columns similar to Open Case Analysis Detail report (Reports > Customer Service > Open Case Analysis > Detail).

 

 

No comments:

Post a Comment