-1

We are trying to pull data for year end analysis and have a case statement working inside of results of a netsuite search that normally utilizes a calculation using {today} within the formula. However, since we want to view the results as if "today" was actually "12/31/2016", what would we need to do to change the following?:

CASE WHEN {today} - {mql_date} < 366 THEN 'Marketing' ELSE CASE WHEN {today} - {sql_date} < 366 THEN 'Sales Dev Team' ELSE 'SALES' END END
DarkHorse
  • 963
  • 1
  • 10
  • 28
T.F.
  • 1
  • 1

1 Answers1

0

Use the following formula:

CASE WHEN TO_DATE('12/31/2016', 'mm/dd/yyyy') - {mql_date} < 366 THEN 'Marketing' ELSE CASE WHEN TO_DATE('12/31/2016', 'mm/dd/yyyy') - {sql_date} < 366 THEN 'Sales Dev Team' ELSE 'SALES' END END
Adolfo Garza
  • 2,966
  • 12
  • 15