Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Please Suggest how to write this in expression
Set TempSum=0;
Set RowCount= 162522;
for(RowCount<= 162522)
if(NoOfPallets <> 0)
TempSum= TempSum+ Pallets;
RowCount++;
Thanks.
Hi Sandeepa,
Is that an expression in a chart? Or a loop in the script? Can you please elaborate on your requirements and expected returns?
BI Consultant
Query is this :
Set TempSum=0;
Let y= noofrows('Data')
for i=1 to $(y)
if(NoOfPallets <> 0)
TempSum= TempSum+ NoOfPallets;
y++;
hope this
Set TempSum=0;
Let y= noofrows('Data')
for i=1 to $(y)
if(NoOfPallets <> 0)
load
TempSum+ NoOfPallets as TempSum
autogenrate 1;
y++;
Please Correct it:
Data:
LOAD CustNo,
ItemCode,
OrderNo,
OrderQty,
DeliveredQty,
InvoiceDate,
Month([Invoice Date]) as Month,
'Q' & ceil(month([Invoice Date]) / 3) AS Quarter,
InvoiceNo,
InvoiceAmount,
Pallet,
Carton,
Shrink,
[No Of Pallets] as NoOfPallets,
[No Of Cartons] as NoOfCartons,
[No Of Shrinks] as NoOfShrinks,
Loose
FROM
(txt, codepage is 1252, embedded labels, delimiter is '\t', msq);
Let y= noofrows('Data');
Join(Data)
Load
for i=1 to $(y)
if(NoOfPallets <> 0, TempSum+ NoOfPallets) as TempSum,
autogenerate 1;
y++;
what to correct its look like ok
take TempSum into expression and see the result
if not please be crear what you want.
Let y= noofrows('Data');
Join(Data)
Load
for i=1 to $(y)
if(NoOfPallets <> 0, TempSum+ NoOfPallets) as TempSum,
autogenerate 1;
y++;
It's giving syntax error.
use this
Let y= noofrows('Data');
Join(Data)
Load
for i=1 to $(y)
if(NoOfPallets <> 0, TempSum+ NoOfPallets) as TempSum// here comma is not required
autogenerate 1;
y++;
Still it is giving error.
" y++ Unknown"
Please find attached of the error file.
i believe no need to join because there is no key fieeld
use the below code
Let y= noofrows('Data');
Load
for i=1 to $(y)
if(NoOfPallets <> 0, TempSum+ NoOfPallets) as TempSum// here comma is not required
autogenerate 1;
y++;
hope this help