Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Welcome to Qlik Community! Check out our new navigation! FIND OUT MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
markgraham123
Specialist
Specialist

check for certain value in field

Hi all,

I'm trying to create a flag if ID has 0102 or 0607 in its name. Can someone please help?

ID, Name

1,   0102,0304,0102, 0909

2,  0102,0607

1 Solution

Accepted Solutions
julian_rodriguez
Partner - Specialist
Partner - Specialist

Hello Mark

On the load script

LOAD

     If(Index(Name,'0102')>0 Or Index(Name,'0607')>0, 1,0) As FlagId,

.....;

Then you can select all the rows that has 1 as FlagId

Regards

View solution in original post

10 Replies
julian_rodriguez
Partner - Specialist
Partner - Specialist

Hello Mark

On the load script

LOAD

     If(Index(Name,'0102')>0 Or Index(Name,'0607')>0, 1,0) As FlagId,

.....;

Then you can select all the rows that has 1 as FlagId

Regards

sunny_talwar

May be like this:

LOAD ID,

          Name,

          If(SubStringCount(ID, '0102') >= 1 or SubStringCount(ID, '0607') >= 1, 1, 0) as Flag

FROM...

Anonymous
Not applicable

in a Chart create e.g calculated Dimension like

=if (match(Name,'0102','ß607') > 0, Name, null()) and suppress Zero values

in script you may load

load ID,

Name

from ...

where match(Name,'0102','0607') > 0;

maxgro
MVP
MVP

maybe

WildMatch(Name, '*0102*', '*0607*')

markgraham123
Specialist
Specialist
Author

Sunny,

What if i have my date set :

ID, Name

1,   0102,0304,0102, 0909

1,   0102,5594

2,  0102,0607

2,  0102,0609

sunny_talwar

It should still work, I think

markgraham123
Specialist
Specialist
Author

Thanks

markgraham123
Specialist
Specialist
Author

Sunny,

What if i have 100 s of names and i want create a loop to dynamically check and assign flag in back end for every name existence??

markgraham123
Specialist
Specialist
Author

i have names from 0101 to 0990 (May be group by name or something)

If any ID has name 0101 then i want to give flag 'Y' for 0101

.

.

.

.

same till 0990