Can you write a formula for results tap that shows...
# ask-stanley-ai
m
Can you write a formula for results tap that shows the quantity of items sold between days 61 and 90
c
AI generated answer (using internal Slack threads):
Based on the conversations, it seems like you are trying to create a formula for a saved search that calculates the quantity of items sold between days 61 and 90. You can use a CASE statement in your formula to check if the transaction date falls within the desired range and then sum the quantities. Here is a sample formula:
Copy code
sql
SUM(CASE WHEN {trandate} BETWEEN {today}-90 AND {today}-61 THEN {quantity} ELSE 0 END)
This formula checks if the transaction date (
{trandate}
) is between 90 days ago and 61 days ago. If it is, it includes the quantity (
{quantity}
) in the sum. If not, it adds 0 to the sum. Please note that
{today}
is a placeholder for the current date in NetSuite and
{trandate}
and
{quantity}
are placeholders for the transaction date and quantity fields respectively. You may need to adjust these placeholders to match the actual field names in your NetSuite environment. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.830225
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.815757275
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.81568855
Please provide your feedback on this answer.
Thank you for your feedback