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

How to remove decimals during load

Hello, I am loading hundreds of .xlsm files and found that values that are formatted as General in Excel are imported with 6 decimals into QV.

For example

ExcelQV
6104061040.000000

What is the solution to get the following result in QV?

Expected result

ExcelQV
6104061040

FYI - I have troed Text() and Num#(), Num() with no success.

Thank you for or support..

Andrea

1 Solution

Accepted Solutions
iamthefixer
Contributor II
Contributor II
Author

Anbu, thank you for reply.

What does Your_Amt_col+0 mean

Andrea

View solution in original post

5 Replies
anbu1984
Master III
Master III

Can you attach sample file

anbu1984
Master III
Master III

Try this

Load Your_Amt_col+0 from Table

iamthefixer
Contributor II
Contributor II
Author

Anbu, thank you for reply.

What does Your_Amt_col+0 mean

Andrea

JonnyPoole
Employee
Employee

What do you have set at the top of the load script for these 2 variables ?  Ensure they are set correctly for your data format

SET ThousandSep=',';

SET DecimalSep='.';

As long as those are set you can use round() to remove any decimals in the load script.  num() doesn't remove decimals from the data model it just sets the display formatting.

change:

Load

     Numberfield

from <source>;

to:

Load

     round(Numberfield) as Numberfield

from <source>;

iamthefixer
Contributor II
Contributor II
Author

Anbu,

I have foudn the solution: num(num#(FIELD))

Many thanks for your support.

Andrea