Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
what is not correct ?
LOAD
Hierarchy,
NetValue,
if((BP-Account= 'Corporate'), 1), if((BP-Account= 'Key'), 2),
if((BP-Account= 'Standard'), 3), if((BP-Account= 'Private'), 4)
as CorpAccGrID
from data
Thanks
Else part missing from your expression
Try this
if
((BP-Account= 'Corporate'), 1, if((BP-Account= 'Key'), 2,if((BP-Account= 'Standard'), 3, if((BP-Account= 'Private'), 4))))
as
CorpAccGrID
Hi,
Thanks
you mean
LOAD
Hierarchy,
NetValue,
if((BP-Account= 'Corporate'), 1) else if((BP-Account= 'Key'), 2) else
if((BP-Account= 'Standard'), 3) else if((BP-Account= 'Private'), 4)
as CorpAccGrID
from data
Try like this
If([BP-Account]='Corporate',1,
If([BP-Account]='Key',2,
If([BP-Account]='Standard',3,
If([BP-Account]='Private',4)))) as CorpAccGrID
In all other cases CorpAccGrID will be Null.
Rgds,
Artjoms
else part is optional in If statement
Rgds,
Artjoms
Hi,
Thanks for all help .
That works.