3 Replies Latest reply: Sep 20, 2016 1:26 PM by Sunny Talwar

# Set Analysis Using Date Fields

New to Set Analysis and running into a snag. I'm trying to create a measure which looks for (2) empty date fields to evaluate the expression (or the opposite: looks for (2) fields with dates to evaluate the expression).

***FYI - The field dates are random dates ( if entered), or they are just blank fields. The dates are all formatted the same & correctly ***

Here's what I have tried:

1. count ( { \$ < fieldA = {' '}, fieldB = {' '} > } stock_number ) if fields are blank
2. count ( { \$ < fieldA -= {'*'}, fieldB -= {'*'} > } stock_number ) if fields are NOT blank
3. count({\$<fieldA={'*'}-{''}, fieldB={'*'}-{''}>} stock_number) ??? found this somewhere ... if fields aren't blank & making them blank???

I have been getting some mixed results with the above expressions if I only try one field at a time, but not both??? Anyone have any ideas?

Thanks for your time! - Casey

• ###### Re: Set Analysis Using Date Fields

When you say blank, do you mean null or is there a white space?

• ###### Re: Set Analysis Using Date Fields

The fields are completely blank (empty cells). I realized last night that my above expressions may be looking for a scenario that I'm not really after. Really looking for an OR type of situation.

count ( { \$ < fieldA = {' '}    OR        fieldB = {' '} > } stock_number )

Not sure yet how to write a set analysis for an and/or statement?

• ###### Re: Set Analysis Using Date Fields

For blanks in fieldA or fieldB

Count({<stock_number = {"=Len(Trim(fieldA)) = 0 or Len(Trim(fieldB)) = 0"}>} stock_number)

or

For Non-Blanks in fieldA or fieldB

Count({<stock_number = {"=Len(Trim(fieldA)) > 0 or Len(Trim(fieldB)) > 0"}>} stock_number)