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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

mport scientific notation values from text file with QV10?

Hi,

Any suggestion how I can import scientific notation values from text file? To illustrate the problem, the following INFILE import in QV10 doesn't give numeric values. I dodn't remember that this problem popped with QV9.

LOAD * INLINE [

FieldSci

1E1

1E-7

1.5e-05

1.3E-03

];



1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Vladimir,
This is how it can be done:
=subfield(upper(FieldSci), 'E',1) *pow(10,subfield(upper(FieldSci), 'E',2))

View solution in original post

2 Replies
Anonymous
Not applicable
Author

Vladimir,
This is how it can be done:
=subfield(upper(FieldSci), 'E',1) *pow(10,subfield(upper(FieldSci), 'E',2))

Anonymous
Not applicable
Author

Thanks, Michael.

I have put this tweak into $ expansion:

set SciHandle=if(FindOneOf($1,'eE')>0,subfield(upper($1), 'E',1) *pow(10,subfield(upper($1), 'E',2)),$1);

then
$(SciHandle(FieldSci))
works


Although I hoped for a more "native" solution. In practice, I don't known if a field contains scientific notation numbers. Meaning I need to apply the fix to every numeric field...

Best

Vlad