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: 
Not applicable

helpppppp pleas :(

hi freinds i have a table that i want to do some function on  values of two columns and insert the result in a new column...

but i can't

this is my qvd file

7 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Qlik Community Tip: Posting Successful Discussion Threads

QlikCommunity Tip: How to get answers to your post?

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Typical example

Table_Name:

Load

Column1,

Column2,

Pow(Column1,Column2) as x^y //Calculating x^y using Pow function

From Tab1.Qvd (qvd);

Note: I am answering this question from my personal laptop with QlikView personal edition. Couldn't open your QVW.

Regards,

KKR

maxgro
MVP
MVP

there are something to change in your script

I tried to change few lines at the beginning (bold)

try this and then let we know if there are problems or something to explain

let p=0;

eetemp:

LOAD AM,

     ML,

     NS,

     p1,

     p2,

     p3,

     s,

     m,

     l,

     y,

     n,

     v,

     nt,

     mt,

     rq

FROM ee.qvd (qvd);

//if p1<> null then          // p1 is a field with more values,  you cannot check

if len(trim('aaa'))>0 then

  LOAD

  p1,p2,p3,

  //p= (p1*1+p2*2+p3*3)/(p1+p2+p3);         

  (p1*1+p2*2+p3*3)/(p1+p2+p3) as p     // this is a new calculated column

  from ee.qvd (qvd);                                     // you have to load from something (file, db, ....)

//end if                                                           // endif and ; at the end

endif;

Not applicable
Author

thanks alot ....

my problem is how to use these statements in my edit Script's file... and where of my Script put these statement..

Not applicable
Author

thanks my freind

i want to do some function on the values of two columns(for example:A,B) and insert the result into third columns (for example:c) in my table

i know that i should use 'for' or 'while'

and do my function in it

but i don't know where of my script should write these and how..

i read the structure of these command but i can't understand how and where use them...

Not applicable
Author

excuseme have you an example about my problem that have if and while or for clause in that?

Not applicable
Author

thanks i find it my self...