Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
psk180590
Creator III
Creator III

Generate New Column based on other column

Hello All,

I'm pulling some data from a DB as in the below format, and would like to generate a new filed based on the data i have.

Sample Table:

Product     ArtikelNr.
A1
A2
A5
A10
B15
B20
B30
D50
G80
F20
C30
E50

Expected Result:

Product     ArtikelNr.   Percentage
A170
A270
A570
A1070
B1570
B2070
B3070
D5070
G8085
F2085
C3070
E5085

So, basically if the Product is A, B, C, D i would like to populate the Percentage column as 70 and for all the other Products i would want 85.

Please, suggest the best possible way. Already tried doing Inline Load but, doesn't seem to work some how.

Thanks!!

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Load

          Product,

          ArtiKelNr,

          If(Match(Product, 'A','B','C','D'), 70, 85) as Percentage

View solution in original post

4 Replies
tresesco
MVP
MVP

Load

          Product,

          ArtiKelNr,

          If(Match(Product, 'A','B','C','D'), 70, 85) as Percentage

Anil_Babu_Samineni

Perhaps this?

If(Match(Product, 'A','B','C','D'), 70, 85) as Column_New

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
gsaipranathi
Contributor III
Contributor III

Hi Sai Kumar,

Use the below expression.

=if(match(Product,'A','B','C','D'),70,85)

psk180590
Creator III
Creator III
Author

Thanks All, worked perfectly!!