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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Doubt creating flag when value doesn't exist

Hi

I have a table like this

CountryYearMonthValue
ARG2016011
BOL2016022
PER201603

I need a flag when value doesnt exist

i tried something like this

TemporalTC:

LOAD Country,

    YearMonth ,

     Value,

     1 AS FLAG_HAY_TC

FROM

[..\number.xlsx]

(ooxml, embedded labels, table is Hoja1);

TC:

noconcatenate

Country

Value,

YearMonth,

IF(isnull(FLAG_HAY_TC),'1','0') AS FLAG_NO_TC

RESIDENT TemporalTC;

I tried also with if flag = 1 but it doesn't work

can you help me? maybe there is an example?

thank you

1 Solution

Accepted Solutions
sunny_talwar

May be try this:

TemporalTC:

LOAD Country,

    YearMonth ,

    Value,

   If(Len(Trim(Value)) > 0, 1, 0) as FLAG_HAY_TC

FROM

[..\number.xlsx]

(ooxml, embedded labels, table is Hoja1);

View solution in original post

1 Reply
sunny_talwar

May be try this:

TemporalTC:

LOAD Country,

    YearMonth ,

    Value,

   If(Len(Trim(Value)) > 0, 1, 0) as FLAG_HAY_TC

FROM

[..\number.xlsx]

(ooxml, embedded labels, table is Hoja1);