Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Community,
How to reuse calculated field in the same load script?
[Table]:
LOAD
[Invoice No]
, [Quantity]
, [Price]
, [Quantity] * [Price] AS [Amount]
, [Amount] * {Rate] AS [GST]
FROM [lib://Files/table.xlsx]
(ooxml, embedded labels, table is Sheet1);
In the same load script, same table
[GST] = [Amount] * {Rate] AS [GST]
instead of
[GST] = ( [Quantity] * [Price] ) * {Rate] AS [GST]
[Table]:
LOAD *,
[Amount] * [Rate] AS [GST];
LOAD
[Invoice No]
, [Quantity]
, [Price]
, [Rate]
, [Quantity] * [Price] AS [Amount]
FROM [lib://Files/table.xlsx]
(ooxml, embedded labels, table is Sheet1);
Cheers
Luis
[Table]:
LOAD *,
[Amount] * [Rate] AS [GST];
LOAD
[Invoice No]
, [Quantity]
, [Price]
, [Rate]
, [Quantity] * [Price] AS [Amount]
FROM [lib://Files/table.xlsx]
(ooxml, embedded labels, table is Sheet1);
Cheers
Luis
Thanks Luis,
Actually I have more than hundred of calculated fields
and so on will be like this?
[Table]:
LOAD *
, etc....
LOAD *
, [GST] + [Amount] AS [Gross Amount];
LOAD *
, [Net Amount] * [Rate] AS [GST];
LOAD [Invoice No]
,[Quantity]
,[Price]
,[Rate]
,[Quantity] * [Price] AS [Net Amount]
FROM [lib://Desktop/table.xls]
(biff, embedded labels, table is Sheet1$);