Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

MATCH,REPLACE,PEEK

Hi,

My Excel data:

divisionname                                       value

$'North region','Southregion'                                     "nort d","south d"

'east r','west r'                                                          "e","w"

Qlikview script:

 

tab1:

LOAD replace(divisionname,'$','') as division1,
value
FROM

(
biff, embedded labels, table is Sheet3$);
Let v1
= Peek('division1', 0, 'tab1');

tab2:
load
[division1] as [divin1],
[value]
Resident tab1
where Match([division1],$(v1));

exit script;

Problem:

i pulled [divin1] in qlikview it must show 'North region','Southregion'  but it is not showing.

$(v1) has this value.

pls help me where iam going wrong.

PFA qvw.

8 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

The issue with the single quote in the divisionname, try like this

tab1:

LOAD replace(replace(divisionname,'$',''), chr(39), '') as Temp,

replace(divisionname,'$','') as division1,
FROM

(
biff, embedded labels, table is Sheet3$);
Let v1
= Peek('division1', 0, 'tab1');

tab2:
load
[division1] as [divin1],
[value]
Resident tab1
where Match([Temp], '$(v1)');

jsingh71
Partner - Specialist
Partner - Specialist

Hi Prudhavi,

Use place your variable name inside the ' ' like below:

tab2:
load
[division1] as [divin1],
[value]
Resident tab1
where Match([division1],'$(v1)');

exit script;

It will work fine. See attached qvw.

Not applicable
Author

both of ur above metods did not work

jagan
Luminary Alumni
Luminary Alumni

Hi,

Attach the sample file, then it would be easier.

Regards,

jagan.

jsingh71
Partner - Specialist
Partner - Specialist

Did you checked the attached qvw??

Not applicable
Author

i have already attached qvw

and may i know wat chr(39) will do?

Not applicable
Author

yeah i checked ur attachment.

tell me how '$(v1)' gave u anser?

$(v1) it self means value....placing in quotes must give error bt it wrked fr u ....

moreover i loaded data frm excel ....

when i loaded frm inline it wrked without placing in quotes.

if i place in quotes it is giving error

Vikash
Contributor III
Contributor III

Hi,

Have you tried using Mixmatch() instead of Match()?

VK