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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Purge function for MonthNames

Hi All,

Is it possible to purge or keep the Monthnames.

e.g. if a field has value such as ABC January 2014.xls, then can we just store ABC in one field and January 2014 in another field using the purge and keep function.

Thanks,

Asma

4 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try using SubField() function

LOAD

*,

SubField(FieldName, ' ', 1) AS Value1,

SubField(FieldName, ' ', 2) AS Value2

FROM DataSource;


Hope this helps you.


Regards,

Jagan.

sunilkumarqv
Specialist II
Specialist II

Try this

LOAD Right(Status, Index(Status, ' ', 2)) as MonthYear ,

Left(Status,3) as Abc ;

LOAD * Inline

[Status

Abc january 2013

Abc january 2014

] ;

Not applicable
Author

Subfield function would work if the filenames are in the same format.

But in this case some files are in the format ABC December 2014.xls, ABC December 2015 Test.xls.

How do I separate the date part from the filename?

jagan
Partner - Champion III
Partner - Champion III

Hi,

If you can attach all possible scenarios then it is easier to provide the solution.

Regards,

Jagan.