Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Flag creation

Hi Folks,

I have two tables and these tables have 2 fields are common. Table1 have all the values and Table2 have only some data. I attached some sample text data for my tables. In execl sheet contains table1, table2  and output Table.

I need to create Flag Y or N, If both tables have the same values then the Flag is Y otherwise N. Please find the excel sheet, we can easily understand my requirement.

Please help me in this,

Thanks & Regards,

Siri

Tags (3)
1 Reply
swuehl
Not applicable

Re: Flag creation

Siri,

not sure if this fits your needs, but I think you can join the two tables and create a new field for the ArmorRecipeAvailable, like

Table1:

LOAD mrecipe_id,

     RecipeName,

     RecipeNameSpace

FROM [test_data.xls] (biff, embedded labels, table is Table1$);

Table2:

left join (Table1) LOAD RecipeName,

     RecipeNameSpace,

     Status,

     1 as ArmorRecipeAvailable

FROM [test_data.xls] (biff, embedded labels, table is Table2$);

Output:

Noconcatenate LOAD mrecipe_id,RecipeName, RecipeNameSpace,Status, if(len(ArmorRecipeAvailable),'Y','N') as ArmorRecipeAvailable Resident Table1;

drop table Table1;