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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How do i convert the value KG to Ton

Dear All

            I have a small query in my data, i need to convert the value KG to Ton.

loa_Rate

16000.25

27325.00

     27.25

      60.00

There are some values which are in KG(RED color) that i want to convert in to Ton.i mean multiplying by 1000. How do i that ?

output will be

16000.25

27325.00

27000.25

60000.00

Can any one help me.

Regards,

Nirmal.

4 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Nirmal

Something like this perhaps (replace ... with the rest oof the load statement)

     LOAD ...

          If(Ioa_Rate < 1000, Ioa_Rate*1000, Ioa_Rate) As Ioa_Rate,

     FROM ...

Not sure how you decide whether the value is Kg or ton.

Hope that helps

Jonathan

BTW I assume that you meant to convert 27.25 from tons to kg to get 27250kg?

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
deepakk
Partner - Specialist III
Partner - Specialist III

hi Nirmal,

I think you need another which tell us that the current  row is in KG or Ton. Is there any possibilty that you can add another field which says Kg or ton like below

loa_Rate     Unit

16000.25      ton

27325.00      ton

      27.25      Kg

       60.00     Kg

using the unit we can create another field as below.

if(unit ='Kg',loa_Rate*1000,loa_Rate) as New_LoaRate

I don't think using the color option you can identify its kg or ton.

Deepak

Not applicable
Author

Dear Jonathan,

             Thanks, Its working..

Regards,

Nirmal.

Not applicable
Author

Hi Deepak,

              We dont have such type of field in Data.

Regards,

Nirmal/Napo