Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Chanty4u
MVP
MVP

RE;Replace...?

hi all,

i have data lik  complxcity values 2,4,8.

filedname :cmplexity

and i want to replce  2 as simple, 4 as expect, 8 as common

how can i achive in script?

thnks in advance...

1 Solution

Accepted Solutions
Anonymous
Not applicable

like this?

if(Complexity=2, 'Simple',

if(Complexity=4, 'Expect',

if(Complexity=8, 'Common'))) as NewField

View solution in original post

7 Replies
sunny_talwar

May be this:

Pick(Match(cmplexity, 2, 4, 8), 'simple', 'expect', 'common')

Anonymous
Not applicable

like this?

if(Complexity=2, 'Simple',

if(Complexity=4, 'Expect',

if(Complexity=8, 'Common'))) as NewField

Kushal_Chawda

=Pick(Match(cmplexity,'2', '4','8'), 'simple', 'expect', 'common') as Complexity_new

HirisH_V7
Master
Master

Hi ,

Like this,

T:

REPLACE ONLY LOAD * INLINE [

    Type, Value

    Simple, 2

    Expect, 4

    Common, 8

   ];

T:

LOAD * INLINE [

    Type

    Simple

    Expect

    Common and Other

];

It Helps for large data sets,

Replace.PNG

Hope this Helps,

Hirish

HirisH
“Aspire to Inspire before we Expire!”
sunny_talwar

On similar lines:

=Dual(Pick(Match(cmplexity, 2, 4, 8), 'simple', 'expect', 'common'), cmplexity) as cmplexity

This avoid having two fields telling the same story

Chanty4u
MVP
MVP
Author

thnx all...all r wrkng fyn...i used If cndition

Chanty4u
MVP
MVP
Author

nice hirish