Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
caseyjohnson
Contributor III
Contributor III

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

3 Replies
sunny_talwar
MVP
MVP

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

Read about Null here -> NULL handling in QlikView

caseyjohnson
Contributor III
Contributor III
Author

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?

sunny_talwar
MVP
MVP

How about this?

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)