Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

if condition fields from 2 tables

Hi, I have an if condition that contains fields from 2 different tables so I tried to concatenate the tables and when run, I received error message saying the field is not found. This is my current script:

INVENT:

LOAD *, IF(INVENTLOCATION='BTSTORE',REORDERPOINT) AS 'ROP(BT)';

SQL SELECT

.

.

.(OTHER FIELDS)

.

ORDERQTY

INVENTLOCATION

.

.

FROM <FILENAME>;

CONCATENATE(INVENT)

SQL SELECT

.

.

.

REORDERPOINT

.

.

FROM <FILENAME>;

Basically I want to create a column that reads from 2 tables.

Thanks!

1 Reply
miikkaqlick
Partner - Creator II
Partner - Creator II

Hi!

Make first that concatenation and after that load if-statement.

Invent:

Load

     *,

     If(.... ) as 'ROP(BT)'

;

Load

      *

SQL Select * From Filename1

Concatenate

Load

      *

SQL Select * From Filename2

When you are doing if, you dont have required fields at that point.

Br,

Miikka

Climber Finland