Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Number being Converted into Mixed Format.

Hi,

I have a field whose values(Numbers) are being represented as Text and number(some as number and some as Text). I want them to be represented as number as I have to compare with the same field in other table. I tried NUM and NUM# in the script, but as there are millions of records, the conversion is taking too long (around 2 hrs). So is there any faster way to do the conversion?

21 Replies
sinanozdemir
Specialist III
Specialist III

Hi Uday,

Are you doing the conversion in the load script or in a straight/pivot table?

tamilarasu
Champion
Champion

Try the below in load script,

Num(Evaluate(YourField),'##.#')

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Properly formatted numbers should be converted automatically by QV. If you display this field in a listbox, is there any obvious difference between numbers that are represented as numerical values, and numbers that are represented as strings (for example wrong decimal/thousand separators, alphabetic characters characters inside the numbers)?

Best,

Peter

Anonymous
Not applicable
Author

Hi,

I am doing the conversion in Load Script.

Anonymous
Not applicable
Author

Hi Peter,

In list box, the values are being displayed as follows,

Field

123456

123457

123458

         123459

         123460

          475380

sinanozdemir
Specialist III
Specialist III

What is the source of your data, SQL Server, Excel, or something else? You said that the conversion is taking too long, is it taking less time without the conversion?

Thanks

Anonymous
Not applicable
Author

The data is already loaded into qvd's and the source for those qvd's is SAP. The time taken without conversion is around 15 mins.

Not applicable
Author

You can go to presentation tab and check on alignment and make the test and number both to left.

Mark_Little
Luminary
Luminary

Hi,

Have you tried to add the num() function into the QVW extracting the data and saving the document to QVD's?

It does seem strange as mentioned by other posters it should automatically format as a number unless any strange chars in the field. Mayby try KeepChar(Number,'0123456789') as Number?

Mark