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.
jasonwills
New Contributor II

Data Manipulation on Import

Hi All,

I have been following some threads on here on importing data into Qlik, and so far it is great (am new to all of this.)

However, I have come up against something I'm not sure how to do, so was hoping someone can help..

When importing the data, it is coming from excel - the text in question has some text in brackets at the end of the cell e.g.

Testing123 (test)

what I'm trying to achieve is when I import data, it drops the brackets, so I will only get Testing123 - I know this is possible in excel, but I am trying to avoid manipulating the data in excel, as there are other things going on with it, so am trying to do it on import.

I will keep looking, but if anyone can help, I would appreciate it.

Many Thanks

Jason

4 Replies
mwoolf
Honored Contributor II

Re: Data Manipulation on Import

=replace(replace(Field,'(',''),')','')

jasonwills
New Contributor II

Re: Data Manipulation on Import

Hi All,

just letting you know that I have found a way that works for me - and the way that my data is - if anybody knows of a better way then I am happy to look at it, but thought I would just pop this on there.

Trim(SubField(Field,'(',1)) as SalesRep,

The above works, but as mentioned, with my data.

@M Woolf - your answer just popped in as I was typing this - many thanks, I shall try that now.

Regards

Jason

Highlighted
mwoolf
Honored Contributor II

Re: Data Manipulation on Import

My example won't work for you. I thought that when you said you wanted to drop the brackets, that you wanted to keep the text inside. My expression would result in:  Testing123 test

jasonwills
New Contributor II

Re: Data Manipulation on Import

Ahh, OK, many thanks, I guess your way is the same as PurgeChar()?

Thanks all the same, I learn something new everyday.

Jason

Community Browser