9 Replies Latest reply: May 31, 2013 5:26 AM by BRIJESH GADHESARIYA RSS

    multiply a field by -1 at script level in qlikview

    BRIJESH GADHESARIYA

      Hi All,

       

      I had a problem in multiplying a field value by -1 at script level, look at my script, it's not working.

       

      Example:

       

      My data in backend is like this:

       

      ID Amount

      1 -800

      2 700

      3 -900

      4 1000

      5 -400

       

      Whenever I am fetching data from backend and storing it into qvd,

      In QVD, Amount  should multiply by -1

       

      My script is:

       

      Table1:

      Load

      ID,

      (Amount*(-1)) as Amount

      From SchemaName.TableName;

       

      Store Table1 into [../Data/Qvd/Table1.Qvd](qvd);

       

      In QVD, Data should be like this:

      ID Amount

      1 800

      2 -700

      3 900

      4 -1000

      5 400

       

      Your feedback is precious to me. . .

      Brijesh