Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a field 'Source' which has values - A, B, C, D, E.
I want to create a new field using this 'Source 1' that should have all the values except A.
How can I create this new field?
Load
....
if(Source<>'A', Source, 'To be defined') as Source
...
Let me know
if(Source=A,null(),Source) as Source 1
Hi,
Think it should rather be
if(Source<>'A', Source,'-') as Source_1
As you do not want to replace the Source variable, but create a new one.
if(Source<>'A',Source)
I have written 'To be defined' because Rahul did not say what to do with missing values ... they could be set to Null(), blank or something else
No issue there, that's indeed whatever you like. I think you may have forgotten to add the correct variable you want to write the information to. The basis is Source, but an additional variable should be created Source 1. In your formula, you tend to overwrite Source, Hence my reaction.
Thank you for all your suggestions. It worked!
Regards,
Rahul
Hai Rahul,
Could you please post the screen shot of code for creating new field from existing .
Thank you