Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

honeyparpay
New Contributor III

Re: Kind of runnig, cumulative or range match in LOAD SCRIPT

Sunny, Tamils response doesn´t wor in my real environment.

Let me specify that the real codes look like C03CA02 or C03XA01.

A


So the more realistic load inline should seem like


Table:

LOAD * Inline [

ID,COD

1,N05BA06

1,N06AX11

1,A01AB03

2,N06AX11

2,C08CA01

3,N05BA09

4,N05AX13

4,C09CA02

4,N06AX11

];


And I need to find those ID with CODs started by 'N05*' or 'N06A' and add the value YES to the new field [MATCH CHECK]

Re: Kind of runnig, cumulative or range match in LOAD SCRIPT

Hello Lander,

Below method works fine.

Data:
load * Inline [
ID,COD
1,N05BA06
1,N06AX11
1,A01AB03
2,N06AX11
2,C08CA01
3,N05BA09
4,N05AX13
4,C09CA02
4,N06AX11
]
;

Left Join
Load ID,
If(WildMatch(Concat(COD, '|'), '*N05*N06A*'),'Yes','No') as [Match Check]
Resident Data Group by ID;

honeyparpay
New Contributor III

Re: Kind of runnig, cumulative or range match in LOAD SCRIPT

Thanks Tamil, I´m working on it between the solutions given by both you and Sunny.

I'm telling you something as soon as possible.

Re: Kind of runnig, cumulative or range match in LOAD SCRIPT

Sure. Take your time.

Re: Kind of runnig, cumulative or range match in LOAD SCRIPT

In addition to what Tamil provided, this also works:

Table:

LOAD * Inline [

ID,COD

1,N05BA06

1,N06AX11

1,A01AB03

2,N06AX11

2,C08CA01

3,N05BA09

4,N05AX13

4,C09CA02

4,N06AX11

];

Join (Table)

LOAD ID,

  If(Count(If(WildMatch(COD, 'N05*', 'N06A*'), COD)) = 2, 'YES', 'NO') as [MATCH CHECK]

Resident Table

Group By ID;


Capture.PNG

Highlighted
honeyparpay
New Contributor III

Re: Kind of runnig, cumulative or range match in LOAD SCRIPT

Hi guys!

This is just for confirming that your logic is correct.

I actually have used both two options depending on the check with i had to work.

Then, with the combination of the results on each column resulting on your logic I was able to finish what I wanted.

Thanks a lot!

Let know if need some more information.

Lander