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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to Restrict some files while loading into qlikview based on File Extensions

Hi Guys,

  I have a column that having Filenames. My issue is when i load that field into qlikview, i want to restrict some files based on the file extensions(eg: .jpg, .jpeg..). How can i do this?

Please help me on this issue.

Thanks

4 Replies
swuehl
MVP
MVP

Maybe using a WHERE clause with a match condition:

LOAD    

     Filenames

FROM Table.xls WHERE match(right(Filenames,4),'.jpg','jpeg','.png');

or

..WHERE match(subfield(Filenames,'.',-1),'jpg','jpeg','png');

Anonymous
Not applicable
Author

Here you are loading the files based on extensions, but i want to restrict those files into qlikview

sujeetsingh
Master III
Master III

Man then only add those extension in where clause which you want

Not applicable
Author

Hi Pradeep,

You can use SubField function there. I am including a sample code that may help you.

IMG_LOAD:

LOAD ID, FILE_NAME INLINE [

ID, FILE_NAME

2, test.jpg

3, test.jpeg

4, no.png

5, yes.png

6, khan.bmp

7, key.jpg

]

where match(SubField(FILE_NAME, '.', -1),'jpg');

And for not loading some file name with extension you can use below WHERE clause:

where if(match(SubField(FILE_NAME, '.', -1),'jpg','jpeg'),0,1);

It'll load the records which contain neither jpg nor jpeg