Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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
Valued Contributor

Re: how to get required data form different criteria?

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

7 Replies
qlikmsg4u
Valued Contributor

Re: how to get required data form different criteria?

Hi Kyaw,

Try this

LOAD Date,

     ID,

     DESCRIPTION,

     AMOUNT,

     F5,

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

FROM Source;

Not applicable

Re: how to get required data form different criteria?

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
Valued Contributor

Re: how to get required data form different criteria?

Please post sample data containing mixed text

Not applicable

Re: how to get required data form different criteria?

Dear K N,

        

Best Regards,

Kyaw Myo Tun

qlikmsg4u
Valued Contributor

Re: how to get required data form different criteria?

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

Re: how to get required data form different criteria?

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

Re: how to get required data form different criteria?

Dear K N,

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

Best Regards,

Kyaw Myo Tun

Community Browser