I am having trouble setting up a Basic Filter where I would like to filter out 3 numbers from a field. I would only like to look at records that have those three numbers in a field.
The Basic Filter works fine when I enter one value but I get an error when I enter more than one.
I suspect that this would require a Custom Filter however, I am not sure how to set up the conditional expression.
Thank you in advance for your help.
Solved! Go to Solution.
This was a helpful approach. Thanks for posting!
I am curious why I would receive a Parse Error at char (42): Parse Error using the customer expression......[StorageTier] IN (1,2,3,4)
Add the Filter tool Use the below, it would need to be written using quotes
[Field name] in ('C', 'E', 'I', 'R', 'N', 'D', 'U')
Do you know why a parse error occurs for this IN function?
"Parse Error at char(63): Unknown function "IN"
I'm trying to filter for the last three days from today. IE. I'd like to create one dataset that only contains a range of dates for the last three days. Perhaps IN only works for single integers and not formulas.
[Date] = IN ('datetimeformat(DateTimeAdd(DateTimeToday(),-1,"days"),"%Y-%m-%d")','datetimeformat(DateTimeAdd(DateTimeToday(),-2,"days"),"%Y-%m-%d")', 'datetimeformat(DateTimeAdd(DateTimeToday(),-3,"days"),"%Y-%m-%d")')
@mackenziek I would use a formula like:
DateTimeDiff(DateTimeToday(),[Date],"days") In (1,2,3)
For What It's worth, your formula would work if you take out the single quotes around your datetimeformats and remove the equal sign:
[Date] IN (datetimeformat(DateTimeAdd(DateTimeToday(),-1,"days"),"%Y-%m-%d"),datetimeformat(DateTimeAdd(DateTimeToday(),-2,"days"),"%Y-%m-%d"), datetimeformat(DateTimeAdd(DateTimeToday(),-3,"days"),"%Y-%m-%d"))
I just tried to do the IN function but it is giving me Parse Error. Does the type of the sort filed need to be something that can have in? I tried double, string, vstring and non of them is letting me use the function IN.