Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to get required data form different criteria?

Dear Experts,

                 In my description column, I would like to pick up the ref no: but these are not the same format. I would like to know how to get the required ref: no?

Best Regards,

Kyaw Myo Tun

1 Solution

Accepted Solutions
qlikmsg4u
Specialist
Specialist

I tried something like this, but this may not the feasible solution and also it will fail if there were symbols other than the used ones in script, i will look into some more solutions

LOAD Date,

     ID,

     DESCRIPTION,

     AMOUNT,

     F5,

     Subfield(Replace(DESCRIPTION,':','-'),'-',2) as [NEW DESCRIPTION]

FROM

Source

View solution in original post

7 Replies
qlikmsg4u
Specialist
Specialist

Hi Kyaw,

Try this

LOAD Date,

     ID,

     DESCRIPTION,

     AMOUNT,

     F5,

     KeepChar(DESCRIPTION,'0123456789') as [NEW DESCRIPTION]

FROM Source;

Not applicable
Author

Dear K N,

  

            it work well for the situation but I made a mistake in my excel. The ref no: is not only contain digit but also character. (eg....13050ABC1002). how can i get that data?

Best Regards,

Kyaw Myo Tun

qlikmsg4u
Specialist
Specialist

Please post sample data containing mixed text

Not applicable
Author

Dear K N,

        

Best Regards,

Kyaw Myo Tun

qlikmsg4u
Specialist
Specialist

I tried something like this, but this may not the feasible solution and also it will fail if there were symbols other than the used ones in script, i will look into some more solutions

LOAD Date,

     ID,

     DESCRIPTION,

     AMOUNT,

     F5,

     Subfield(Replace(DESCRIPTION,':','-'),'-',2) as [NEW DESCRIPTION]

FROM

Source

Not applicable
Author

Hi,

This will help u to complete u r task.

keepchar is a string function it will help to separate text and string values

KeepChar(DESCRIPTION,'0123456789') as Newdata

Thanks and regards,

Balaji.k

Not applicable
Author

Dear K N,

             It work correctly for my purpose. Thanks for your help.

Best Regards,

Kyaw Myo Tun