Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to create field containg these values?

Dear all,

i have two coloumens project name and transaction class in this for pericular project name there are one or many trans class ie like NRE,PROEXPENCE,BU-LEVEL,GRASSSET,etc.

in this we create one more field that satisify this condation.

if(transaction class=NRE and PROEXPENCE,'p2c')

if(transaction class="BU-LEVEL" and PROEXPENCE,'p2c')

if(transaction class="BU-LEVEL" and NRE,'p2c')

if (transaction class='NRE',NRE')

if (transaction class='BU-LEVEL',BU-LEVEL)

if (transaction class=PROEXPENCE',PROEXPENCE)

output:

project name    transation class     chngetransation class

altis                     NRE                            P2C

altis                   BU-LEVEL                     P2C

altis                   PROEXPENCE               P2C

etios                  NRE                              NRE

wanger               PROEXPENCE              PROEXPENCE             

audi                   NRE                              P2C

audi                   PROEXPENCE               P2C

swis                  EXPENCIVE                  -

hundi                 BU-LEVEL                    BU-LEVEL

thanks

arun

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe like this?

I2:

LOAD * INLINE [

project name,    transaction class

altis,                     NRE

altis,                   BU-LEVEL

altis,                   PROEXPENCE

etios,                  NRE

wanger,               PROEXPENCE

audi,                   NRE

audi,                   PROEXPENCE

swis,                  EXPENCIVE

hundi,                 BU-LEVEL

];

Left join LOAD

[project name],

pick(

wildmatch(concat([transaction class],','),'*NRE*PROEXPENCE*','*BU-LEVEL*PROEXPENCE*','*BU-LEVEL*NRE*','*NRE*','*BU-LEVEL*','*PROEXPENCE*')

,'p2c','p2c','p2c','NRE','BU-LEVEL','PROEXPENCE') as [new class]

resident I2 Group by [project name];

hope this helps,

Stefan

View solution in original post

3 Replies
swuehl
MVP
MVP

Maybe like this?

I2:

LOAD * INLINE [

project name,    transaction class

altis,                     NRE

altis,                   BU-LEVEL

altis,                   PROEXPENCE

etios,                  NRE

wanger,               PROEXPENCE

audi,                   NRE

audi,                   PROEXPENCE

swis,                  EXPENCIVE

hundi,                 BU-LEVEL

];

Left join LOAD

[project name],

pick(

wildmatch(concat([transaction class],','),'*NRE*PROEXPENCE*','*BU-LEVEL*PROEXPENCE*','*BU-LEVEL*NRE*','*NRE*','*BU-LEVEL*','*PROEXPENCE*')

,'p2c','p2c','p2c','NRE','BU-LEVEL','PROEXPENCE') as [new class]

resident I2 Group by [project name];

hope this helps,

Stefan

Anonymous
Not applicable
Author

HI stefan,thanks for replay.

its correct answer.

Anonymous
Not applicable
Author

hi,

OpxProjectNameTransactionClassTransactionClassMap
Altius-1Depreciation
Altius-1External Capital
Altius-1Internal Capital
Altius-1NRENRE
Altius-1NRE - FT
Altius-1Outside Services
Altius-1Outsourced Services
Altius-1Proto ExpenseProto
Altius-1TRAVEL
Bran (Fortius   G+, G- and Fortius F-)Depreciation
Bran (Fortius   G+, G- and Fortius F-)Internal Capital
Bran (Fortius   G+, G- and Fortius F-)NRENRE
Bran (Fortius   G+, G- and Fortius F-)Proto ExpenseProto
CTP   Outsourcing (Non-NPI Project)NRENRE
EABU Finance   - Occupancy relatedUnclassified Expense
Nano (1/2   Tiny)BU-level Owned BudgetP2C
Nano (1/2   Tiny)Depreciation
Nano (1/2   Tiny)External Capital
Nano (1/2   Tiny)Internal Capital
Nano (1/2   Tiny)NREP2C
Nano (1/2   Tiny)Proto ExpenseP2C

i want to create one more field ie transactionclassmap that contains these output values.we have projectname and transactionclass note:combination of BU-LEVEL OWNED with proto expence or NRE is 'P2C'.Please tell me how to solve this in backend.