Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Ayoub
New Contributor III

Delete Duplicated words

Hello community .. 

in an application i'm working on we need to delete duplicated words in sentences like :  Qlik Qlik View we should get Qlik View 

i worked with the code bellow but it didn't give  me the result i'm looking for .  i should look for all the repeated words in the same sentences and delete them.  

dup.PNG

1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: Delete Duplicated words

I think I wouldn't use a sub-routine with/within outside-loops else normal loads with inside-loops and an aggregation - something in this way:

t1:
load *, -(StringPart = previous(StringPart)) as Flag, rowno() as RowNo;
load String, subfield(String, ' ') as StringPart from Source;

t2:
load concat(StringPart, ' ', RowNo) resident t1 where Flag = 0;

- Marcus

View solution in original post

4 Replies
MVP & Luminary
MVP & Luminary

Re: Delete Duplicated words

I think I wouldn't use a sub-routine with/within outside-loops else normal loads with inside-loops and an aggregation - something in this way:

t1:
load *, -(StringPart = previous(StringPart)) as Flag, rowno() as RowNo;
load String, subfield(String, ' ') as StringPart from Source;

t2:
load concat(StringPart, ' ', RowNo) resident t1 where Flag = 0;

- Marcus

View solution in original post

Ayoub
New Contributor III

Re: Delete Duplicated words

i liked  ur answer @marcus_sommer and as i'm new at qlikview ..  How could i get  the result i'm looking for  for exemple : ayub atr 

MVP & Luminary
MVP & Luminary

Re: Delete Duplicated words

Did you try my suggestion? Just apply it step by step and look what happens to understand the logic. After it you could extend it to your real requirement which probably contained any ID and maybe need the one or another adjustment.

- Marcus

Ayoub
New Contributor III

Re: Delete Duplicated words

Thank u So much for the Help 😄