Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
daisy1438
Contributor III
Contributor III

how to rename inside the field data?

Hi I have field  [Geography] and data like

[Geography]

canada

europe

america

usa

MENAT

My requirement is change the rename in above data like

MENAT to "'Middle East" and USA to 'United States'.

how to change this. And it is possible to change in front end level. actually  I am using Geography field for filter.

Thanks

5 Replies
justinphamvn
Creator II
Creator II

Hi,

Try this:

Script load data:

LOAD

    ...

,if([Geography] = 'MENAT', 'Middle East', if([Geography] = 'usa', 'United States', [Geography] )) as [Geography]

...

Hope this helps,

Justin

Anonymous
Not applicable

Hi

In front end  you can use replace function for each region in calculated dimension

replace(Geography,'MIDDLE EAST','MENAT')

But rather doing this you can apply MAPPING in back end.

Thanks

raman_rastogi
Partner - Creator III
Partner - Creator III

Or You can use inline Load table with Geography and changed name,map that table with your data model.

ex-

LOAD * INLINE [   

    Geography, ChangedName  

    UK,        United Kigdom

    usa,       United States   

    MENAT,     Middle East

]

Regards

Raman

jonathandienst
Partner - Champion III
Partner - Champion III

Create a mapping table (inline below, but it could be stored in a file or database) and then applymap in the corrections:

MAP_GEOGRAPHY:

Mapping

LOAD * INLINE [  

    Geography, ChangedName 

    UK,        United Kigdom

    usa,       United States  

    MENAT,     Middle East

];

// LOAD Main table containing Geography field:

Main:

LOAD

    ...

    ApplyMap('MAP_GEOGRAPHY', Geography, Geography) as Geography,

    ...

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jagadeeshbv29
Contributor
Contributor

not working me  can you tell another way