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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how can we merge values of a field in script level?

Hi,

How can we merge values of a field in script. For ex;

Disease

A

B

C

D

and here i want 2 values c & d to get merged into 1 value nd named as others?

Please help.

1 Solution

Accepted Solutions
Not applicable
Author

It is working with:

if(Disease='AML' OR Disease='CLL','Others',Disease) as Disease.

Thanks a lot everyone

View solution in original post

25 Replies
Anonymous
Not applicable
Author

if ( match( [Disease] , 'C' , ''D' ) , 'nd' ) as [others] ,

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

LOAD A,

     B,

     C & D As others

....

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

Link the tables using Join statement and use Concat() function to merge th Values to C & D

Not applicable
Author

I tried

LOAD [Therapeutic Area] as %TA,

     Disease ,

     Histology,

FROM

(ooxml, embedded labels, table is Sheet1) Where if(match(Disease,'AML','CLL')) as Others;

and it is showing an error.

Please help

Not applicable
Author

These are not fields but the values of a field that i want to put together

Not applicable
Author

How do you mean "merge"?

Not applicable
Author

It is like

Disease

A

B

C

D

and in script while loading:

load

Area,

Disease,

Project

from xyz.xlsx

and now i want to merge the values in disease.

aveeeeeee7en
Specialist III
Specialist III

Hi Aakansha

Go to your script and write this code:

Load Disease,

if(WildMatch(Disease,'C','D'),Disease) AS Others,

if(WildMatch(Disease,'C','D'),'Others',Disease) AS Others11

From

your file path

Not applicable
Author

Try this:

Temp:

LOAD Area,

          Disease,

          Project

FROM xyz.xlsx

Real:

LOAD *,

          C & D as X

Resident Temp;

Drop Table Temp;