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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating a feild in a script.

I have two fields that I would like to use to create a new field ( simply one field minus the other). I need to create this field to use it in set analysis. I have attemped to use the formula below in my script with now luck

Set New Field = Field1-Feild2;

Any suggestions?

Thank you!

1 Solution

Accepted Solutions
Not applicable
Author

How about adding it to your load script?

i.e.

LOAD *, Field1-Field2 as "New Field";

View solution in original post

3 Replies
Not applicable
Author

How about adding it to your load script?

i.e.

LOAD *, Field1-Field2 as "New Field";

Anonymous
Not applicable
Author

Hi jhoffman ,

I'm not sure if I understood you well, but you could try to use the LET statement instead of SET.

So,

LET Field = Field1-Feild2;

would result in a difference between the two fields.

I guess this is what you are looking for.

Valera 🙂

Not applicable
Author

Thanks for the help!! I should have been more clear with my issue , but adding my new field to the load script allowed me to use it in set analysis.

Thanks again,

Jeff