Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Script LEFT JOIN

Can anyone identify what is wrong with this in my script please? It is failing at the red part.

TEMPTABLE:

LOAD

UNIT.SOLD_MONTH,

%_BNO

FROM [$(QVD_Path)\BUYER_unit.qvd](qvd);

left join (TEMPTABLE)

load

%_BNO,

max(UNIT.SOLD_MONTH) as MAX.SOLD_MONTH

resident TEMPTABLE;

BUYER_UNIT_TABLE:

load

if(UNIT.SOLD_MONTH >= MonthStart(addmonths(MAX.SOLD_MONTH,-2)) and UNIT.SOLD_MONTH < Monthstart(addmonths(MAX.SOLD_MONTH,1)), 'Active') as BUYER_BUYING_STATUS,

%_BNO

resident TEMPTABLE;

drop field MAX.SOLD_MONTH;

drop table TEMPTABLE;

Thanks

1 Solution

Accepted Solutions
Clever_Anjos
Employee
Employee

load

%_BNO,

max(UNIT.SOLD_MONTH) as MAX.SOLD_MONTH

resident TEMPTABLE

GROUP BY %_BNO;

View solution in original post

2 Replies
Clever_Anjos
Employee
Employee

load

%_BNO,

max(UNIT.SOLD_MONTH) as MAX.SOLD_MONTH

resident TEMPTABLE

GROUP BY %_BNO;

raghvendrasingh
Creator II
Creator II

Hi,

when use any aggregation function (eg-sum(),max(),avg()) in script,then it is mandatory to use group by with respect to

all dimensions.

Thanks,

Raghvendra