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: 
jyoshna
Contributor II
Contributor II

Merging Single Filed values into One

HI Team,

I have a field called Commodity Group which has data as below, I want Natural Gas and Nat Gas ICE to be represented as Natural Gas under Commodity_Type. How to achieve this.

Commodity_ Type
Natural Gas
Agriculture
Base Metals
Crude oil
Refined Product 
Nat Gas ICE
Pre Metal
Labels (1)
1 Solution

Accepted Solutions
zar
Employee
Employee

Hi!

Yo can use Mapping to achieve the change (if you are using load script):

Map_Correction_Gas:
Mapping
Load * Inline [
MapFrom, MapTo
Nat Gas ICE, Natural Gas
]
;
 
 
DATA:
Load 
[Commodity_Type]
    ,ApplyMap('Map_Correction_Gas',[Commodity_Type],[Commodity_Type]) as [Corrected_Commodity_Type]
;
Load * Inline [
Commodity_Type
Natural Gas
Agriculture
Base Metals
Crude oil
Refined Product 
Nat Gas ICE
Pre Metal
]
;
 
Or, if you are using Data Manager, you can simply replace values:
 
zar_0-1674389539621.png

 

zar_1-1674389574258.png

 

View solution in original post

2 Replies
zar
Employee
Employee

Hi!

Yo can use Mapping to achieve the change (if you are using load script):

Map_Correction_Gas:
Mapping
Load * Inline [
MapFrom, MapTo
Nat Gas ICE, Natural Gas
]
;
 
 
DATA:
Load 
[Commodity_Type]
    ,ApplyMap('Map_Correction_Gas',[Commodity_Type],[Commodity_Type]) as [Corrected_Commodity_Type]
;
Load * Inline [
Commodity_Type
Natural Gas
Agriculture
Base Metals
Crude oil
Refined Product 
Nat Gas ICE
Pre Metal
]
;
 
Or, if you are using Data Manager, you can simply replace values:
 
zar_0-1674389539621.png

 

zar_1-1674389574258.png

 

jyoshna
Contributor II
Contributor II
Author

@zarzar

ThankYou for providing the solution.