Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

HOW FILTER A WORD

Hello guys!

See if you can help me ...

-I have a field called Text.

-I need to filter all rows in that field, through a keyword 'CNPJ' and 20 more characters in front of the word.

-After filtering need to put them in a field called 'CNPJ-Filtered'

How to do this in QlikView?

Follows the type of file that receives the field called Text.

Many thx...

11 Replies
MarcoWedel

Hi Matheus,

one solution could be:

tabInput:

LOAD Text,

    If(WildMatch(Text, '*CNPJ*') and WildMatch(TextNumPattern, '*00.000.000/0000-00*'),Text) as [CNPJ-Filtered];  

LOAD @1 as Text,

    Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(@1,

      '1', '0'),

      '2', '0'),

      '3', '0'),

      '4', '0'),

      '5', '0'),

      '6', '0'),

      '7', '0'),

      '8', '0'),

      '9', '0') as TextNumPattern

FROM [http://community.qlik.com/servlet/JiveServlet/download/580793-118485/DO8687_02_06_2014.txt]

(txt, codepage is 1252, no labels, delimiter is ';', msq);

QlikCommunity_Thread_128025_Pic1.JPG.jpg

QlikCommunity_Thread_128025_Pic2.JPG.jpg

hope this helps

regards

Marco

Anonymous
Not applicable
Author

Thanks Marco !

This is a solution for my problem.