Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jeroenlansberge
Contributor III
Contributor III

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 !!

5 Replies
petter
Partner - Champion III
Partner - Champion III

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
Partner - Creator
Partner - Creator

Hi,

Please try PurgeChar function.

PurgeChar(Action_Priority,'"') as Action_Priority2

Thank you.

petter
Partner - Champion III
Partner - Champion III

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

jeroenlansberge
Contributor III
Contributor III
Author

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
Contributor III
Contributor III
Author

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!