Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Create field based on other fields

Hei,

Is it possible to create a new field based on the value of other fields?

Basically i want to cross reference different fields and return some category.

if(field1 == "1" and field2=="2") Category = "C1"

else if(field3 == "test") Category = "c2"

else

     Category = "C3" (all others)

Please don't hesitate to ask if i am being unclear.

Best Regards,

Lasse Rolstad

1 Solution

Accepted Solutions
MVP
MVP

Re: Create field based on other fields

LOAD

     field1,

     field2,

     field3,

     if(field1 = 1 and field2 = 2,'C1',

          if(field3='test', 'c2',

               'C3'))                                   as Category,

     ...

2 Replies
MVP
MVP

Re: Create field based on other fields

LOAD

     field1,

     field2,

     field3,

     if(field1 = 1 and field2 = 2,'C1',

          if(field3='test', 'c2',

               'C3'))                                   as Category,

     ...

Not applicable

Re: Create field based on other fields

Again you come to my rescue. Thanks alot

Community Browser