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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

writing to table within loop

Hello,

Trying to create a table which is a result of reading two other resident tables, and a lot of conditional inline logic

(greatly simplified logic here)

[TABLE_A]

Field_1

Field_2

[TABLE_B]

Field_3

Field_4

For each Field_1

               if condition is satisfied

                    Let x = Field_2 * Field_3

                     ??? how do I now write x to TABLE_C ? ???

               end if

Next

Question: how to write to create TABLE_C ?

any guidance would be appreciated!

11 Replies
Not applicable
Author

Hi there, I have posted an update below, with a better description of what I am trying to do..

Not applicable
Author

The solution suggested by Jagan works.

Tried the below solution but its not working (Logic similar to this post http://community.qlik.com/thread/79917)

TableA:
LOAD
Field_1
Field_2
FROM TableA;

TableB:
LOAD
Field_3
Field_4
FROM TableB;

TableC:
LOAD
Field_1,
if(Field_1 < somecondition,(Field_2 * Field_3),Field_1)
RESIDENT TableA;

-Qlikuser