Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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
Champion III
Champion III

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