Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Ayoub
Contributor III
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
marcus_sommer
MVP & Luminary
MVP & Luminary

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
marcus_sommer
MVP & Luminary
MVP & Luminary

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
Contributor III
Contributor III
Author

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 

marcus_sommer
MVP & Luminary
MVP & Luminary

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
Contributor III
Contributor III
Author

Thank u So much for the Help 😄