Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Person | Start | End | Whatever_ID |
---|---|---|---|
1 | 01-01-2015 | 02-01-2015 | 10 |
3 | 04-04-2015 | 11 | |
1 | 12 | ||
2 | 13 | ||
2 | 14 |
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;
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;
use the if condition on ur start ans end date wherever the values are null u can put ur flag else the source date.