david lopez Posted March 3, 2021 Share Posted March 3, 2021 Hi Community, Having trouble figuring out a case state and was hoping to get some help.I have one field [Event Code] which has multiple codes in it and another field [Effective Date]which has multiple dates in it going back 10 years. My goal is to create another column with a casestatement, and what I'd like is for the case statement to evaluatethe conditions of the codes but alsolimit only pulling back results that are limited to the last 36 months. Any idea how I'd create this Below is a snapshot of the data and my initial case statement, without the date condition, not sure where that would go. Thanks for any help. case when [Event Code] = "HIR" or [Event Code] = "REH" then "Category 1" when [Event Code] = "PRO" or [Event Code] = "LAT" or [Event Code] = "DEM" or [Event Code] = "XFR" then "Category 2" when [Event Code] = "TER" or [Event Code] = "RET" then "Category 3" end Link to comment Share on other sites More sharing options...
Gaia Paolini Posted March 4, 2021 Share Posted March 4, 2021 When you say 'pulling back results' what do you mean Making the calculated column blank Could you upload the example as a file Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now