Qlik Community

Ask a Question

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

Check for a word and identify similar word

Hi Friends,

Kindly help me out with below case.

My data is as below.

   

Org. NameMatchCase
Award1
Star2
Certificate3
Appreciation4
Match5

My output should be

   

Org. NameMatchCase
Award1
Awards1
Star2
Stars2
Certificate3
Certificatee3
Appreciation4
Appreciation s4
Match5
Match es5

Here my intension is, qlikview script should treat the similar words(ex: Award/Awards) as same MatchCase. Is there a way to achieve this. Plz help.


Thanks,

Raghav

1 Solution

Accepted Solutions
Partner
Partner

Sure, here you go.

matches1:

LOAD

  Concat(Chr(39)&[Org. Name] & '*'&Chr(39),',',MatchCase) as match

;

LOAD [Org. Name],

     MatchCase

FROM

[https://community.qlik.com/thread/252021]

(html, codepage is 1250, embedded labels, table is @1);

LET matchCondition = Peek('match',0,'matches1');

DROP Table matches1;

Matched:

LOAD [Org. Name],

     WildMatch([Org. Name],$(matchCondition)) as MatchCase

FROM

[https://community.qlik.com/thread/252021]

(html, codepage is 1250, embedded labels, table is @2);

View solution in original post

11 Replies
Contributor III
Contributor III

Plz note:

I don't want to use apply map or Comment tables concept.. Bcz in my requirement there are 5 lakh rows and I don't want to manually write MatchCase for all.

I want Qlikview script to dynamically identify similar words. Plz help.

Thanks,

Raghav

May be this?

LOAD * Inline [

Org. Name, MatchCase

Award, 1

Star, 2

Certificate, 3

Appreciation, 4

Match, 5

];

Concatenate

LOAD If([Org. Name] = Peek([Org. Name],-1), [Org. Name], [Org. Name] & 's') as [Org. Name], MatchCase Resident Sample;

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Contributor III
Contributor III

Thank You Anil. Here my concern is not about adding 's' , I meant to say...

Award,

Award is ,

Award  is given ,

Award is given to ... should be considered as one and hence MatchCase  for this should be same.


Similarly.

Star,

Star is,

Star is in,

Start is in the,.. should be considered as one unit..


Plz help. Thanks.

My data is as below.

  

Org. Name MatchCase
Award 1
Star 2
Certificate 3
Appreciation 4
Match 5

My output should be

  

Org. Name MatchCase
Award 1
Awards 1
Star 2
Stars 2
Certificate 3
Certificatee 3
Appreciation 4
Appreciation s 4
Match 5
Match es 5

Anyhow, I followed this. May be use Wild card search. From my input you will get as you expect. I am not sure if i follow wrong

The Search String

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Partner
Partner

You could try using WildMatch function to assign MatchCase. Check the attachment for how it could be done for your example data.

Contributor III
Contributor III

hi can yu plz shre script..

Partner
Partner

Sure, here you go.

matches1:

LOAD

  Concat(Chr(39)&[Org. Name] & '*'&Chr(39),',',MatchCase) as match

;

LOAD [Org. Name],

     MatchCase

FROM

[https://community.qlik.com/thread/252021]

(html, codepage is 1250, embedded labels, table is @1);

LET matchCondition = Peek('match',0,'matches1');

DROP Table matches1;

Matched:

LOAD [Org. Name],

     WildMatch([Org. Name],$(matchCondition)) as MatchCase

FROM

[https://community.qlik.com/thread/252021]

(html, codepage is 1250, embedded labels, table is @2);

View solution in original post

Hi,

maybe helpful to identify Org. Name groups:

QlikCommunity_Thread_252021_Pic1.JPG

tabTemp:

LOAD [Org. Name]

FROM [https://community.qlik.com/thread/252021] (html, codepage is 1252, embedded labels, table is @2);

table1:

LOAD [Org. Name],

     If([Org. Name] like Peek(OrgNamGroup)&'*' and RecNo()>1,Peek(OrgNamGroup),[Org. Name]) as OrgNamGroup

Resident tabTemp

Order By [Org. Name];

DROP Table tabTemp;

hope this helps

regards

Marco

Contributor III
Contributor III

Both are helpful. thank you.