Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

jasonwills
Not applicable

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
Not applicable

Re: Data Manipulation on Import

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

jasonwills
Not applicable

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

mwoolf
Not applicable

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
Not applicable

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