Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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);