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: 
Aspiring_Developer
Specialist
Specialist

Convert ASCII text type to integer in qliksense

Hello All ,

I have below fields:-

Aspiring_Developer_0-1716206633860.pngAspiring_Developer_1-1716206668530.png

I am trying to convert Build_UPRN into integer but it not populating . I tried below :- Floor(num(Build_UPRN)) as Num_Build_UPRN , 

It didn't worked . I am trying to convert this field into num as i need to join these two tables on this field and since the data type of both the field in different, it is creating error . Can anyone please help me with this ?

 

Thanks in advance

Labels (2)
1 Solution

Accepted Solutions
SunilChauhan
Champion II
Champion II

Try
1.Floor(num#(Trim(Build_UPRN)))

or 
2.Floor(num#(Trim(Replace(Build_UPRN,' ',''))))

 

 

Sunil Chauhan

View solution in original post

3 Replies
Aspiring_Developer
Specialist
Specialist
Author

Hello All,

I also tried  Floor(num#(Build_UPRN)) as Num_Build_UPRN  but still it does not work

TauseefKhan
Creator III
Creator III

Hi @Aspiring_Developer,
The below code helps in replacing characters with ASCII codes in a string in Load scrip

MapTable:
Mapping LOAD
Chr(RecNo() - 1) AS Char,
RecNo() - 1 AS Asciicode
AutoGenerate 256;

Data:
LOAD
Num,
MapSubString('MapTable', Num) as IntegerField
FROM DataSource;

** When applicable please mark the correct/appropriate replies as "solution".Please LIKE threads if the provided solution is helpful to. **



SunilChauhan
Champion II
Champion II

Try
1.Floor(num#(Trim(Build_UPRN)))

or 
2.Floor(num#(Trim(Replace(Build_UPRN,' ',''))))

 

 

Sunil Chauhan