Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
JMAROUF
Creator II
Creator II

floor in load

Hi every one;

i have a problem with Floor() function in Load ,  i need to eliminate decimals , the output is 8.0 instead of 8.

can any one help please.

 

 

Labels (2)
1 Solution

Accepted Solutions
martinpohl
Partner - Master
Partner - Master

Hi,

a value is a numeric field in Qlik is stored as is was loaded the first time.

So if you load

5

05

005

into your field all values are shown as 5.

If you load

05

005

5

then it is stored as 05.

Qlik also join 5 and 05 because it is the same (numeric) value.

So maybe your .0 values are from another source?

regards

 

View solution in original post

8 Replies
m_woolf
Master II
Master II

num(floor(YourField),'#,###')

sunny_talwar

Just use Num() function to not show any decimals.

Num(Floor(....), '#')

JMAROUF
Creator II
Creator II
Author

Thank you for answers but   i want to eliminate decimal part in calculation before the end of load's statement. 

sunny_talwar

It should do that if you use that in the script... is it not doing this?

JMAROUF
Creator II
Creator II
Author

Hello @sunny_talwar  there is a part of script which is based on the field's value , it must be 8 instead of 8.0 for example :

if(my_field in (8,4,2..),"expression")  so i will try as soon as possible 

Colin-Albert

It may help if you posted your actual load script or the relevant section of it.
Then we can see how your are rounding the data in context.

JMAROUF
Creator II
Creator II
Author

Hello @Colin-Albert,

this is my load script :

  left join(Détail_Sin)    
    load 
    
    Num_Sin,
     Num(floor(max(CASBAREME)),'#')                                                                             as CASBAREME_SIN
resident    QUIT_SIN;
 
the output is in the attachement.
 
thank you in advance;
martinpohl
Partner - Master
Partner - Master

Hi,

a value is a numeric field in Qlik is stored as is was loaded the first time.

So if you load

5

05

005

into your field all values are shown as 5.

If you load

05

005

5

then it is stored as 05.

Qlik also join 5 and 05 because it is the same (numeric) value.

So maybe your .0 values are from another source?

regards