Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
kunkumnaveen
Specialist
Specialist

How to achieve the requirement at script level

Hello All,

I am trying to get ride of extra decimals at script level itself ,which I havent succeeded

Any suggestion will be very helpful 

Sample Data set 

                                                         Price,                                   Sale,                                              Amount

                                                       586.065434563                          23876.2310098712                     98765.045629434545

Out put Excepting 

                                                      Price,                                        Sale,                                             Amount

                                                     586                                              23876.231                                  98765.045629

 

Like      Price column should have 0 decimals 

               Sales Column should  need to have only 3 decimals 

               Amount Column Should need to have 6 decimals 

 

 

How can I able to  achieve this requirement ?

 

 

Thank You 

 

                                                

 

 

Labels (1)
2 Replies
MayilVahanan

Hi

Try like below

Load Num(Price, '#,##0') as Price, Num(Sale, '#,##0.###') as Sale,Num(Amount, '#,##0.######') as Amount Inline
[
Price, Sale, Amount

586.065434563, 23876.2310098712, 98765.045629434545
];

O/p:

MayilVahanan_0-1652435896560.png

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
kunkumnaveen
Specialist
Specialist
Author

Thanks Mayil for the quick reply

I tried Num but it is not working in my case , can we use round if so how to get decimals in round function 

Num1.PNG

Num2.PNG