Discussion board where members can get started with QlikView.
I have a field with values starting with an underscore(_) and would like to get rid of those and used the below script. =if(left(Location,1)='_',right(Location,len(Location)-1))
It takes out the underscore in most of the values but when it comes to _100, it's giving a result of 1E2.
What is the correct code to display this value a string of 100? Other values have long string.
Hoping for your help with this.
Can you share input values and output result you want to see?
am not sure your req
purgechar(Field,'_') as newLocation
As Chanty repiled just add Text(Purgechar(Field,'_')) as newLocation for converting Num to String
Hope it works.
1E2 = 100 - it's just another type of writing numbers. Try to change your expressions into:
if(left(Location,1) = '_', alt(num(mid(Location, 2)), mid(Location, 2)), Location) as LocationNew
If the underscore could only occure on the first position you could try it with the suggestion from sureshqv respectively replacing with it the mid-part in my suggestion.
This worked. Thank you very much for your help!
I tried this and it worked!