Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

jeroenlansberge
New Contributor II

iAuditor vs Qlik sense; remove characters left & right

Ls,

When using a csv file extracted from iAuditor I get to many characters as input in my field

Example:

Field name Action_Priority gives an output ""Medium"" where I want to remove the "" on both sides. Basically this counts for all Fields.

I have tried:

Action_Priority,

    Left(Action_Priority, Len(Action_Priority)-2) as Action_Priority2,

This works for one side (characters "" on the right are removed but I don't manage it to get it also working on the left.

Any ideas?

On the other hand it would be great if there is also a single line scripting removing the characters "" text "" for all fields.

I am not a Qlik sense Goeroe so please be patience

Thanks in advance !!

Tags (2)
5 Replies
MVP
MVP

Re: iAuditor vs Qlik sense; remove characters left & right

If you don't have or expect any "" inside the string but always just in the beginning and the end you could do this:

Replace(Action_Priority,'""','') AS Action_Priortiy2

Or if you want to be sure to only remove them from the beginning and the end:

If( Left(Action_Priority,2)='""' AND Right(Action_Priority,2)='""' , Mid(Action_Priority,3,Len(Action_Priority)-4), Action_Priority) AS Action_Priority2

nicholas5141
New Contributor III

Re: iAuditor vs Qlik sense; remove characters left & right

Hi,

Please try PurgeChar function.

PurgeChar(Action_Priority,'"') as Action_Priority2

Thank you.

MVP
MVP

Re: iAuditor vs Qlik sense; remove characters left & right

Please mark this question as answered and the correct answer as "correct" to close this thread if you question really got answered...

jeroenlansberge
New Contributor II

Re: iAuditor vs Qlik sense; remove characters left & right

Dear Petter,

Sorry for my late reply, I managed to get the thing solved with

Action_Status,

        Replace(Action_Status, Chr(34), '') as Action_Status2

Thank you for your support in this!

jeroenlansberge
New Contributor II

Re: iAuditor vs Qlik sense; remove characters left & right

Dear Nic,

Thank you for your answer and reply. I used

Action_Status,

        Replace(Action_Status, Chr(34), '') as Action_Status2,

In the end I did not have to use the script anymore as i found a better way to get my data without ' " ' .

But anyway it is helpful!