Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
pranaview
Creator III
Creator III

How to remove specific characters from Left for all the values of a field in QlikView

Hi Guys,

I have a field which I require for mapping purpose. But it is adding G00/G0/G prefix to all the order numbers that I want to match.

For Example : G0080202594 or G0285144563 or G1085346991

So, what I want is to trim off the initial G or any 0 afterwards which will give me something like this 80202594/285144563 /1085346991.

As I can't tell for sure how many 0s will be there after G letter so I can't just remove a specific number of letters from beginning. I would like to know how can I remove the G and any 0 that comes right after(if any).

Any help will be appreciated.Thanks in advance.

Pranav

14 Replies
vishsaggi
Champion III
Champion III

Did you try my expression without the letter G?

pranaview
Creator III
Creator III
Author

Yes I tried the expression without G and it doesn't work in this scenario as it will remove the first character regardless of what it is. The order format for my field starts with G or sometimes another letter but for now i'm only concerned about the order numbers starting with the G. But if in future the requirement differs then i'll have to make adjustments to this expression. Like maybe putting a condition to check if first character of the order number is a digit or not.

vishsaggi
Champion III
Champion III

Can you show some eg' values where this did not work? Just wanted to check.

pranaview
Creator III
Creator III
Author

If suppose the Order number is 8308510406 then after going through this expression, you will get 308510406. as output.

So it removes the first character irrespective of whether it is a G or a digit.

vishsaggi
Champion III
Champion III

Strange this is what i see when i use my expr using the eg you gave.

Capture.PNG