Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Daryn
Creator
Creator

Merge two values as one (value bot field)in load script ?

Good day everyone,

Thanks as always for your time/knowledge and help in advance.

I have a field [Company] this contains various values, of which two of them 'FR01' and 'FR02' I would like to merge/combine  these two as one, ie: FR03.  Or FR01 could just contain both.

But not as a new field, just as  a new value within that [Company] field?

If([Company]= 'FR01','FR02') AS FR03,

Simply creates a field FR03.

Can this be done? I assumed I was better to do this in load script than every time it appears within a chart or sheet.

Thanks as always,  

Regards Daryn

Labels (1)
1 Solution

Accepted Solutions
Or
MVP
MVP

Load If([Company]= 'FR02','FR01',[Company]) AS Company

From YourTable;

View solution in original post

4 Replies
Or
MVP
MVP

Load If([Company]= 'FR02','FR01',[Company]) AS Company

From YourTable;

Daryn
Creator
Creator
Author

Hi Or,

Many thanks for your reply. 

This still seems to load as a separate field rather than value within the [Company] field?

Below image: Expression editor - fields

Daryn_0-1655292013671.png

Below image: (no new FR03) value in above showing values of [Company]

Daryn_1-1655292099769.png

Apologies if I have misunderstood or not explained my requirement fully.

Regards, Daryn

Or
MVP
MVP

As I wrote it, the FR02 rows should be merged into FR01, as you described in the original post.

The FR03 field is not part of my suggestion, and is presumably related to something else you've done.

Daryn
Creator
Creator
Author

Apologies Or, my misunderstanding and you are correct of course and it works 👍

Thank you again, much appreciated.