Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I have problem with using the new create field "Tender" to create another field "PEP".
Date([Start Date]) as "Start",
Date([End Date]) as "End",
Date(IF([Start Date]='', (''), AddMonths([Start Date],-4) ) )as "Tender",
Date(IF([Budget Type]=('CAPEX'), IF([Tender]=(''), (''), AddMonths([Tender], -3) ), ('') )) as "PEP"
And it is possible to use rename field with the new name? for example instead of:
Date(IF([Start Date]='', (''), AddMonths([Start Date],-4) ) )as "Tender", can i use Date(IF([Start]='', (''), AddMonths([Start],-4) ) )as "Tender"?
Hi Lingling,
Date(IF([Budget Type]='CAPEX', IF([Tender]='', '', AddMonths([Tender], -3)),'')) as PEP
The quotation marks is obligate when you have two or more word long column name, at this case with "PEP" refer an existing column, PEP refer to alias.
G.
Sorry, I don't get it:( I am trying to know is it possible to use new create field to create another field?
for example, i use formula to generate a new field known as "Tender", then i would like to create another field which make use of the "Tender" field?
use a preceding load as you can not refer to an expression as a field in the load
Table:
load *,
Date(If([Budget Type]='CAPEX', if(Tender='', '', AddMonths([Tender], -3) ), '' )) as "PEP";
LOAD *,
Date([Start Date]) as "Start",
Date([End Date]) as "End",
Date(If([Start Date]='', '', AddMonths([Start Date],-4) ) )as Tender;
LOAD * INLINE [
Budget Type,Start Date,End Date
CAPEX
];
Short answer is NO
you can not refer the expression -> Date(IF([Start Date]='', (''), AddMonths([Start Date],-4) )
in another expression
Yes, sorry, I didn't noticed, that the Tender field is created in the same statement.
G.