Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm trying do kind of multiple if statements.
If(SKU='1' and Warehouse='A', Warehouse) as special
But for some reason its not working. May be my syntax problem.
Can some pls look into it.
the statement works if you remove the preceding load (bold below)
because in thepreceding load you don't have the special field
//LOAD SKU, Warehouse, Sum(Amount) as SS
//Group By SKU, Warehouse;
LOAD SKU,
Warehouse,
Amount,
If(SKU='1' and Warehouse='A', Warehouse) as special
FROM
C:\Users\ATARIGONDA\Desktop\Book1.xlsx
(ooxml, embedded labels, table is Sheet1);
or this if you want the special field
LOAD
SKU,
Warehouse,
SS,
If(SKU='1' and Warehouse='A', Warehouse) as special;
LOAD
SKU, Warehouse, Sum(Amount) as SS
FROM
C:\Users\ATARIGONDA\Desktop\Book1.xlsx
(ooxml, embedded labels, table is Sheet1)
Group By SKU, Warehouse;
the statement works if you remove the preceding load (bold below)
because in thepreceding load you don't have the special field
//LOAD SKU, Warehouse, Sum(Amount) as SS
//Group By SKU, Warehouse;
LOAD SKU,
Warehouse,
Amount,
If(SKU='1' and Warehouse='A', Warehouse) as special
FROM
C:\Users\ATARIGONDA\Desktop\Book1.xlsx
(ooxml, embedded labels, table is Sheet1);
or this if you want the special field
LOAD
SKU,
Warehouse,
SS,
If(SKU='1' and Warehouse='A', Warehouse) as special;
LOAD
SKU, Warehouse, Sum(Amount) as SS
FROM
C:\Users\ATARIGONDA\Desktop\Book1.xlsx
(ooxml, embedded labels, table is Sheet1)
Group By SKU, Warehouse;
Hi Massino,
So, i cannto do If statement along with preceeding load??
I got u.
I should have included the "Special" field in preceeding load.
Thank you Massimo.