Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a column: Otstanding_amount
I would like to add an another column named Status with a script. This column needs to be filled in automatically as follows:
"Outstanding amount to be payed" when the value of Outstanding_amount is not zero
"Payed" when the outstandin amount is zero
Here is my script:
LOAD [Invoice number],
[Total amount],
Outstanding_amount
?????? as Status
FROM
$(My_Path)\Tabel 2.2 Clients.xlsx
(ooxml, embedded labels, table is [xls-1212-140305]);
Try this
LOAD [Invoice number],
[Total amount],
Outstanding_amount
if(Outstanding_amount <> 0, 'Outstanding amount to be payed', 'Payed') as Status
From
$(My_Path)\Tabel 2.2 Clients.xlsx
(ooxml, embedded labels, table is [xls-1212-140305]);
Try this
LOAD [Invoice number],
[Total amount],
Outstanding_amount
if(Outstanding_amount <> 0, 'Outstanding amount to be payed', 'Payed') as Status
From
$(My_Path)\Tabel 2.2 Clients.xlsx
(ooxml, embedded labels, table is [xls-1212-140305]);
HI
You can also try with match()
LOAD [Invoice number],
[Total amount],
Outstanding_amount
if(Match(Outstanding_amount,0),'Payed','Outstanding amount to be payed') as Status
From
$(My_Path)\Tabel 2.2 Clients.xlsx
(ooxml, embedded labels, table is [xls-1212-140305]);