Nada Ahmed
08/25/2024, 2:29 PMCeligo AI
08/25/2024, 2:29 PMAI generated answer (using internal Slack threads):Based on the conversations, to get the amount for the last year till the same date last year in a saved search, you can use a formula (currency) with a CASE WHEN statement. The formula would look something like this:
sql
CASE
WHEN {transaction.trandate} BETWEEN ADD_MONTHS({today}, -12) AND {today}
THEN {amount}
ELSE 0
END
This formula checks if the transaction date is between the current date last year and the current date. If it is, it returns the transaction amount; otherwise, it returns 0.
Please note that {today}
is a NetSuite placeholder that represents the current date, and {amount}
represents the transaction amount. You would replace these with your actual field identifiers if they are different.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
08/25/2024, 2:29 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.846087575
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.845998764
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.843133509
Celigo AI
08/25/2024, 2:30 PM