Please fix this formula CASE WHEN {amountunbilled}...
# ask-stanley-ai
n
Please fix this formula CASE WHEN {amountunbilled} / {amount} < 0.1 THEN Yes ELSE No END
c
AI generated answer (using internal Slack threads):
The formula you provided seems to be a SQL case statement that checks if the ratio of
amountunbilled
to
amount
is less than 0.1. If it is, it returns 'Yes', otherwise it returns 'No'. However, the formula seems to be using HTML entities for less than (
<
) which might be causing issues. Here is the corrected formula:
Copy code
sql
CASE 
    WHEN {amountunbilled} / {amount} < 0.1 THEN 'Yes'
    ELSE 'No'
END
Please note that this formula assumes that the
amount
is not zero to avoid division by zero error. If there's a possibility that
amount
could be zero, you should handle this case separately to avoid any errors. ****** 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.852861941
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.839055657
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.834282458
Please provide your feedback on this answer.