Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
nicolai_moller
Contributor
Contributor

Flag for nulls

Hi

How do I create a flag that gives me every person who doesn't have any start or end dates (both must be empty)?

The table below, should only return Person 2, as there are zero dates on that person.

Thanks.

PersonStartEndWhatever_ID
101-01-201502-01-201510
304-04-201511
112
213
214
1 Solution

Accepted Solutions
sunny_talwar

Try this:

Table:

LOAD Person,

    Date#(Start, 'MM-DD-YYYY') as Start,

    Date#(End, 'MM-DD-YYYY') as End,

    Whatever_ID

FROM

[https://community.qlik.com/thread/165746]

(html, codepage is 1252, embedded labels, table is @1);

Join(Table)

LOAD Person,

  If(Sum(Start) = 0 and Sum(End) = 0, 1, 0) as Flag

Resident Table

Group By Person;

View solution in original post

2 Replies
sunny_talwar

Try this:

Table:

LOAD Person,

    Date#(Start, 'MM-DD-YYYY') as Start,

    Date#(End, 'MM-DD-YYYY') as End,

    Whatever_ID

FROM

[https://community.qlik.com/thread/165746]

(html, codepage is 1252, embedded labels, table is @1);

Join(Table)

LOAD Person,

  If(Sum(Start) = 0 and Sum(End) = 0, 1, 0) as Flag

Resident Table

Group By Person;

buzzy996
Master II
Master II

use the if condition on ur start ans end date wherever the values are null u can put ur flag else the source date.