Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filter values from field

Hi.

I have a easy question for some of you...I would like to exludes values from a field.  

Like the example below, I only would like to have values that have "aspx". I think is it best to do it in the script.

/_layouts/images/pdficon_small.png
/_layouts/images/square.gif
/_layouts/infopage.aspx
/_layouts/inplview.aspx
/_layouts/JScript/addOns.js
/_layouts/JScript/jquery-1.9.1.min.js

Thanks in advance!

Labels (1)
1 Solution

Accepted Solutions
MayilVahanan
MVP
MVP

Hi

Try like this

Load If(index(FieldName,'.aspx') > 0, FieldName) as FieldName

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

4 Replies
MayilVahanan
MVP
MVP

Hi

Try like this

Load If(index(FieldName,'.aspx') > 0, FieldName) as FieldName

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
israrkhan
Specialist II
Specialist II

Try like below

load *,

If(Right(YourField, 4)= 'aspx', 1, 0) as Aspx

from abc,

Aspx is a webpage extension, and it will be at most right always, and will be 4 characters always, so this solutions will work..try

bruno_m_santos
Partner - Creator
Partner - Creator

You are right.

If you don't need the other values, don't load them.

Load * from 'Table'

not WildMatch(Field,'Value*','value2*');

Not applicable
Author

Hi,

You can use Index function (return > 0 if it finds the characters you are looking for) either in the field or in the where clause


Field; see mayil'a answer

Where: add a where clause like WHERE Index(FieldName, 'aspx') > 0

LOAD FielName,

   ...

FROM ...

WHERE Index(FieldName, 'aspx') > 0

Fabrice