Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

Display a string of 100

Hi Experts!

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.

_100

_IT DEPARTMENT

_SOUTH WING

Hoping for your help with this.

6 Replies
Highlighted

Can you share input values and output result you want to see?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
Champion III
Champion III

try

am not sure your req

purgechar(Field,'_') as newLocation

Highlighted
Contributor
Contributor

Hi Preciosa,

As Chanty repiled just add Text(Purgechar(Field,'_'))  as newLocation for converting Num to String

Hope it works.

Regards,

Prashant Naik

Highlighted
MVP & Luminary
MVP & Luminary

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.

- Marcus

Highlighted
Creator II
Creator II

Hi Prashant!

This worked.  Thank you very  much for your help!

Highlighted
Creator II
Creator II

Thanks Marcus!

I tried this and it worked!