Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Converting Expontial values into number format

Hi QV Experts,

I have been struggling to converting the below expontial values into number format with 5 decimals values.
I have used all the possible QV functions to convert into number format but no luck.

-9,4008000000000003E-01
-9,4230000000000003E-01
-9,4306999999999996E-01
-9,5730000000000004E-01
0,0000000000000000E+00
1,0000000000000000E+00
1,0528530000000000E+01
1,0686040000000000E+01

I have checked with all below functions but no luck.

1)evaluate((-9,4008000000000003E-01)

2)num(num#(-9,4008000000000003E-01) )

3)num(num#(-9,4008000000000003E-01),'##################')

4)num((-9,4008000000000003E-01)

Please provide your valuable suggestions.

Thanks

9 Replies
Anonymous
Not applicable
Author

Thread with the same requirement http://community.qlik.com/message/17763#17763

Hope it helps.

Marc.

Colin-Albert

You need to specify the decimals in your number format

     num( -9.5730000000000004E-01, '#,##0.00000000')

You may also need to check your default number settings for ThousandSep and DecimalSep

The test above was done with these settings

     SET ThousandSep=',';
     SET DecimalSep='.';

robert_mika
Master III
Master III

=left(a,len(a)-4)

The In Number tab use Number

(here a is your Field)

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Change your environment settings with

SET DecimalSep=',';

SET ThousandSep=' ';  // may not be necessary

Now the numbers should just load:

load *

Inline

[

Nbr

-9,4008000000000003E-01

-9,4230000000000003E-01

-9,4306999999999996E-01

-9,5730000000000004E-01

0,0000000000000000E+00

1,0000000000000000E+00

1,0528530000000000E+01

1,0686040000000000E+01

] (delimiter is '|');

The delimiter statement is to prevent , from being viewed as a field separator. This produces this output

-0.95730000

-0.94307000

-0.94230000

-0.94008000

0.00000000

1.00000000

10.52853000

10.68604000

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Colin-Albert

Hi Robert,

Your string slicing ignores the value of the exponential.

The values would nee to be multiplied by      pow(10, exponent)       to be correct

Not applicable
Author

Thanks all for your quick replies,but these solutions also not helped me to resolve the issue.

robert_mika
Master III
Master III

Thanks Colin.

You are right

robert_mika
Master III
Master III

Could you post your data set/file?

Not applicable
Author


Please check the attached sample file