Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
chiragngohel
New Contributor II

Two tables field value to check

Hi,

Can someone help me please?

I am trying to compare two file fields value with same field name(comparison for two months) in script.

Can some one suggest best way? Is it possible?

FOR i = 1 to NoOfFields('T')
Concatenate

Fields:

LOAD

// FieldName($(i),'New') as FieldName
FieldName($(i),'T') as F,
FieldValue($(i),'T') as v,
//FieldValue(FieldName($(i),'T')) as F2,
//if(FieldName like FieldName($(i),'New') and FieldValue=FieldValue,'Match','Others') as t2,
if(WildMatch(FieldName($(i),'T'), FieldName($(i),'T2')),'Match','Other') as f1,
if(Match(FieldValue($(i),'T'),FieldValue($(i),'T2')),'Match','Other') as f3

AutoGenerate 1

;
NEXT I

12 Replies
chiragngohel
New Contributor II

Re: Two tables field value to check

I tried field value but it is not working.

Re: Two tables field value to check

Hi,

I think your script seems to be fine for me. May be you can try to change the "Next i" ( In your code shows capital letter "I" - I believe this is not a typo)

FOR i = 1 to NoOfFields('T')
Concatenate

Fields:

LOAD

// FieldName($(i),'New') as FieldName
FieldName($(i),'T') as F,
FieldValue($(i),'T') as v,
//FieldValue(FieldName($(i),'T')) as F2,
//if(FieldName like FieldName($(i),'New') and FieldValue=FieldValue,'Match','Others') as t2,
if(WildMatch(FieldName($(i),'T'), FieldName($(i),'T2')),'Match','Other') as f1,
if(Match(FieldValue($(i),'T'),FieldValue($(i),'T2')),'Match','Other') as f3

AutoGenerate 1;


NEXT i

MVP
MVP

Re: Two tables field value to check

Hi,

As suggested by settu_periasamy change NEXT I  to NEXT i.

Qlikview is Case sensitive Capital I and Small i is not the same.

Regards,

jagan.

chiragngohel
New Contributor II

Re: Two tables field value to check

I cannot see capital "I" in my script. I am using only "i".

chiragngohel
New Contributor II

Re: Two tables field value to check

That is already small i.

Re: Two tables field value to check

Copy your posted Script (In the first post), then check, it shows capital Letter 'I'.

See this..

Capture.JPG

chiragngohel
New Contributor II

Re: Two tables field value to check

not I any more.

chiragngohel
New Contributor II

Re: Two tables field value to check

T:
LOAD Name,
total,
'table'
as type
FROM

(
ooxml, embedded labels, table is Sheet1);
//Concatenate(T)


QUALIFY *;
UNQUALIFY Name;
//left join(T)
T2:
LOAD Name,
total,
'table2'
as type
FROM

(
ooxml, embedded labels, table is Sheet1);

//
UNQUALIFY *;

chiragngohel
New Contributor II

Re: Two tables field value to check

   

Nametotal
a20
b20
c30
d50
Community Browser