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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
stephbzr
Contributor III
Contributor III

Convert a string number to an integer number temporarily

Hello,

I've already tried this formula which works very well to perform a calculation where the numbers are originally in string, float temporarily, then back to string. 

 

String.valueOf(Float.valueOf(data_1) + Float.valueOf(data_2))

 

But I can't find an alternative (or it's the formula that doesn't work) for a string originally, integer temporarily to increase a counter, then string again. I tried these two methods, but they don't work :

 

String.valueOf(Integer.valueOf(data_1++))

String.valueOf(Integer.parseInt(data_1++))

 

Do you have an idea ?

Labels (4)
1 Reply
coolguru
Contributor
Contributor

Try:

String.valueOf(Integer.parseInt(data_1) + 1)

String.valueOf(Integer.valueOf(data_1) + 1)