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: 
rsdhavle
Creator III
Creator III

Grouping of similar values in a field

I have one Field lets say A which contains 5 values p,q,r,s,t. Now i need to create one additional field which will be based on values from Field A  like follows,

p + q + r = 'X'  and p + r = 'Y'   <- New Field

How can we create this new field for such a scenario?

1 Reply
its_anandrjs

Share any sample file or let me know p,q,r,s,t is number or string it is. If it is number then use group by in the load script.

Source:

LOAD * Inline

[

A,Value

p,10

q,20

r,30

s,40

t,50

];

LOAD

A,

Sum( IF(Match(A,'p','q','r'), Value) ) as X,

Sum( IF(Match(A,'p','r'), Value) ) as Y

Resident Source

Group By A;

Regards

Anand