Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Setting variable in the load from a table

Hi,

So I have a simple table that I use to determine whether or not I want to load data from certain regions, its called Active regions.

The structure is something like this

RegionOperational
North1
South0
East0
West1

I want to create a variable called vLOAD if the region is North and Operational is 1. I then want to use that vLOAD variable to say, if vLOAD =1 then load another table, if not then move down the script.

Is this type of thing possible?

Thanks

Stuart

1 Solution

Accepted Solutions
swuehl
MVP
MVP

You can also access directly your original table:

Table:

LOAD

  Region,

     Operational

FROM

[https://community.qlik.com/thread/221010]

(html, codepage is 1252, embedded labels, table is @1);

Let vLOAD = Lookup('Operational','Region','North','Table');

If vLOAD = 1 THEN .....

View solution in original post

3 Replies
sunny_talwar

May be like this:

Table:

LOAD Concat(Operational, ', ', Key) as List;

LOAD RecNo() as Key,

  Region,

     Operational

FROM

[https://community.qlik.com/thread/221010]

(html, codepage is 1252, embedded labels, table is @1);

LET vNorth = SubField(Peek('List'), ', ', 1);

LET vSouth = SubField(Peek('List'), ', ', 2);

LET vEast = SubField(Peek('List'), ', ', 3);

LET vWest = SubField(Peek('List'), ', ', 4);

swuehl
MVP
MVP

You can also access directly your original table:

Table:

LOAD

  Region,

     Operational

FROM

[https://community.qlik.com/thread/221010]

(html, codepage is 1252, embedded labels, table is @1);

Let vLOAD = Lookup('Operational','Region','North','Table');

If vLOAD = 1 THEN .....

Not applicable
Author

Thank you. I know these thangs are failrly simple but you are a guru !