Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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!

1 Solution

Accepted Solutions
MayilVahanan

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

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