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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
kavita25
Partner - Specialist
Partner - Specialist

How to change association

Hi,

I have a new requirement :

If Dealer locates in Central region, then how to change it to East region.

Note: Dealer and Region are separate fields.

Regards,

Kavita

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Maybe like this:

LOAD ParentGroup, if(ParentGroup = 'Konark Automobile', 'East', Region) as Region

FROM

(qvd) where region='Central' or region='West';

If you have more ParentGroups that should get another Region you can create a mapping table:

MapRegion:

LOAD * INLINE [

ParentGroup, Region

ABC, West

CDE, East

FGH, East

...etc

];

Then use the applymap function to do the mapping:

MyTable:

LOAD ParentGroup, applymap('MapRegion', ParentGroup, Region ) as Region

FROM

(qvd) where region='Central' or region='West';


talk is cheap, supply exceeds demand

View solution in original post

9 Replies
PrashantSangle

Hi,

If this changes is only for one region.

Then write if statement in script

if(wildmatch(region,'Central'),'East',region)

If it is for all region then better if you maintain in excel sheet of inline table

try like

New_Region:

LOAD * INLINE[

Region,New_Region

Central, East

];

Due to Association old Region field will associated with new_Region field

Hope this solve your problem

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Change the value of the Region field for that dealer from Central to East. You can do this in the script or preferable in the source system where your data ultimately comes from. If you want to do this the hard way you can use a dynamic update action (Dynamic Update - Simple Database).


talk is cheap, supply exceeds demand
kavita25
Partner - Specialist
Partner - Specialist
Author

This change is only for specific dealer not for all the dealers.

PrashantSangle

Hi,

If possible, Post sample apps.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
avinashelite

Please provide the sample data

kavita25
Partner - Specialist
Partner - Specialist
Author

Hi,

Here is the sample data where the Parent group "Konark Automobile" belongs to "Central" region, which should be change to "West" Region.

Regards,

Kavita

PrashantSangle

Hi,

If you want to do this for mulitple Parent Group

Maintain Updated Parent Group with Old Region and New Region in Excel Sheet.

Then create key for ParentGroup&Region

Link between New Table with Existing Table using Key and Use New Region for Parent Group.

Try something like this.

Existing_Table:

Load ParentGroup,

          Region,

          ParentGroup&'-'&Region as Key

From existingTable;

//New_Table:

join

Load ParentGroup&'-'&Old_Region as Key

          Temp_Region

From New_Excel_Table;

Final_table:

Load ParentGroup,

if(isNull(Temp_Region),Region,Temp_Region) as New_Region

Resident Existing_Table;

Drop table Existing_Table;

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Maybe like this:

LOAD ParentGroup, if(ParentGroup = 'Konark Automobile', 'East', Region) as Region

FROM

(qvd) where region='Central' or region='West';

If you have more ParentGroups that should get another Region you can create a mapping table:

MapRegion:

LOAD * INLINE [

ParentGroup, Region

ABC, West

CDE, East

FGH, East

...etc

];

Then use the applymap function to do the mapping:

MyTable:

LOAD ParentGroup, applymap('MapRegion', ParentGroup, Region ) as Region

FROM

(qvd) where region='Central' or region='West';


talk is cheap, supply exceeds demand
kavita25
Partner - Specialist
Partner - Specialist
Author

Hi,

Thanks Gysbert !!!

Following expression worked for me:

if(ParentGroup = 'Konark Automobile', 'East', Region) as Region