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

Announcements
Join us in Zurich on Sept 24th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

String to integer conversion

Is it possible to convert the format from string into integer in QV? For example my data is : PX42/ABCDEFG1234/0.222342 and i want to convert it to integer....as a number....is it possible for me??

27 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

What are the other dimensions in the Chart?  If there are other dimensions then use Pivot table so that it will show the value only once.

Regards,

Jagan.

Not applicable
Author

ya i change to pivot table already but it still gv me duplicate data......haha...

Not applicable
Author

Hi mohan, now i'm using yr formula with KeepChar(DimensionName, '1234567890') and then may i ask what are the function for the '1234567890' ? what are the function for them??can u explain for me?

jagan
Partner - Champion III
Partner - Champion III

Hi Lee,

Check whether there are any blank spaces in your data values?  Try Trim(DimensionName) as Calculated dimension or in script.

Regards,

Jagan.

jagan
Partner - Champion III
Partner - Champion III

Hi,

KeepChar() will keep the given characters in the string and remove the additional character which are not in give string(second parameter).

Example:

KeepChar('ABC456', '1234567890') -- Gives you the output as 456, since A, B and C are not in given char list


KeepChar('ABC', 'AC') -- Gives you the output as AC, since B is not in given char list


Hope this helps you.


Regards,

Jagan.

Not applicable
Author

very nice explanation......thk~~~~

Not applicable
Author

mohon....if i now hv a value = 1234567898765433221 then i want to add 0.0000 in front of the value.....how should i do?

now i useing the expression with :

=num#(0.0000) & num#(Ord([BIN/filmPARTnum/uFILMtar])) & num#(KeepChar([BIN/filmPARTnum/uFILMtar],0123456789)) & (num#(KeepChar([BIN/filmPARTnum/vFILMtar],0123456789)))

if the expression without      num#(0.0000) &

then it work perfect for me.....but once i want to add 0.0000 in front of the data.....it gv me error.......any idea??

jagan
Partner - Champion III
Partner - Champion III

Hi,

If you are not doing any calculations on this field then try like this

=Text('0.0000' & 1234567898765433221)

Regards,

Jagan.