Trying to do a case statement with results depending on # of days but get invalid formula Incorrect syntax near (. Is it something simple I typed wrong or is this something that I cannot calculate? This is for a calculated field in tabular report.
CASE
WHEN Datediff(day,[@field:DOH],GetUTCDate()) <= 30 THEN '0-30'
WHEN Datediff(day,[@field:DOH],GetUTCDate()) > 30 AND <= 60 THEN '31-60'
WHEN Datediff(day,[@field:DOH],GetUTCDate()) > 60 AND <= 90 THEN '61-90'
ELSE '90+'
END
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
Fleshzombie
Trying to do a case statement with results depending on # of days but get invalid formula Incorrect syntax near (. Is it something simple I typed wrong or is this something that I cannot calculate? This is for a calculated field in tabular report.
CASE
WHEN Datediff(day,[@field:DOH],GetUTCDate()) <= 30 THEN '0-30'
WHEN Datediff(day,[@field:DOH],GetUTCDate()) > 30 AND <= 60 THEN '31-60'
WHEN Datediff(day,[@field:DOH],GetUTCDate()) > 60 AND <= 90 THEN '61-90'
ELSE '90+'
END
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.