Skip to main content

Hello,

 

I'm trying to add a filter to data extraction.

 

I want the filter to include only values which  contain a "." or a "-" in the string.

 

I've tried creating the following Calculated Field:

 

"If [Animal] = "Bear" and not contains([TX ID], "." and [TX Timestamp] > 1354752000

     or [Animal] = "Bear" and not contains([TX ID], "-" and [TX Timestamp] > 1354752000

          then 0"

 

When extracting the data, I add the calculated field as a filter, and exclude 0. The filter completely remove values which contain "." from the table. It's as if the statement read sequentially, and the first part (keep ".") is overwritten by the second part (keep "-"). Breaking the statement in half using elseif, such as:

 

"If [Animal] = "Bear" and not contains([TX ID], "." and [TX Timestamp] > 1354752000

     then 0

elseif  [Animal] = "Bear" and not contains([TX ID], "-" and [TX Timestamp] > 1354752000

     then 0"

 

doesn't help either.

 

Any ideas on what I'm missing here? Thanks!

 

- Pete

3 answers
0/9000