Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
caseyjohnson
New 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

Tags (1)
3 Replies

Re: Set Analysis Using Date Fields

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

Read about Null here -> NULL handling in QlikView

caseyjohnson
New Contributor III

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

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)