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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
RAJ6
Contributor III
Contributor III

tconverttype component problem

Hi Folks,

  

I have 75 rows are there in my excel.          

In my excel have reject records. so I fixed all the columns datatype are string for metadata

Then I used tconverttype component for string to double.

I have tried but two records missing.

The tconverttype component not convert string to double properly.

is there any other way to solve this issue. Please kindly share your information. 

Labels (2)
6 Replies
Anonymous
Not applicable

Hello,

What does the missing two records look like?

Would you mind posting your job design screenshots on forum so that we can check it to see if it is a bug for tConvertType component.

Best regards

Sabrina

Anonymous
Not applicable

SUppose our data has commas in between then it fails to read it as double. sometimes even the negative sign.
Eg: -32,987,987
This value wont be read by tconverttype.
is there any bug? or can we avoid this?

Thanx
Anonymous
Not applicable

@Aishwarya,

 

       You will have to clean your data by removing comma before applying the type conversion. Comma is added to a number for readability purpose but it will create problem while type conversions.

 

      Could you please use java replace command to remove all comma with empty string and then try to convert the string?

 

      If the answer has helped you, could you please mark the topic as resolved? Kudos are also welcome 🙂

 

Warm Regards,

 

Nikhil Thampi

manodwhb
Champion II
Champion II

@Aishwarya,Yes as suggested by @nthampi, first remove the special charters,if you have by using removeall function in java,that you can use in tJavarow or tMap,based on the way and then covert from sting to double it will work.

Anonymous
Not applicable

Can you tell me the formula to remove all comas? //D removes other characters like negative sign and percentage
Anonymous
Not applicable

@Aishwarya,

 

    Please use the below function in tmap to convert comma to empty string. 

 

row1.input.replaceAll(",", "")

 

    If the answer has helped you to resolve the issue, could you please mark the topic as closed? Kudos are also welcome 🙂

 

Warm Regards,

 

Nikhil Thampi