Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
rebelfox
Creator
Creator

Refer To An Expression Value Created In Same Load Statement

Is there a way I can refer to a column value in a load statement that is itself created in the same load statement?

In other words I build column A from an expression and then in Column B I build a new value which includes the calculated column A value.

This would be the LOAD equivalent of creating a calculated expression column 1 in a straight table chart and then in a subsequent column, refer to the value created in column 1 to create a value in column 2  ( using Column(1) in the expression ).

Thanks

3 Replies
swuehl
MVP
MVP

Use a precding LOAD:

LOAD *, F4+F3 AS F5;

LOAD *, F1*F2 AS F4;

LOAD * INLINE [

F1, F2, F3

1,2,3

];

sunny_talwar

In addition you can do this two other ways, keeping swuehl‌‌'s example here:

1) Resident Load

Table:

LOAD *, F1*F2 as F4 INLINE [

F1, F2, F3

1,2,3

];

FinalTable:

LOAD *, F4+F3 as F5

Resident Table;


DROP Table Table;


2) In the same load by referring to the actual field names

Table:

LOAD *,

          F1*F2 as F4,

          (F1*F2) + F3 as F5

INLINE [

F1, F2, F3

1,2,3

];


Best,

Sunny

rebelfox
Creator
Creator
Author

OK I understand the concept.

Thanks.