Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Highlighted
NurulAin
New Contributor II

Replace dimension name in Bar chart

Hi, i have the following charts and need to change the dimension name "Not applicable" to "HUB" and "Papua New Guinea" to "PNG". Can someone show me how to go about this? 

Dimension used in this is "Market".

1.jpg

10 Replies
MVP & Luminary
MVP & Luminary

Re: Replace dimension name in Bar chart

You can use a calculated dimension in which you replace the values with other values using an if statement. But a better solution is to replace the values in the load script. Or create an extra field in the load script where you replace the values.

talk is cheap, supply exceeds demand
NurulAin
New Contributor II

Re: Replace dimension name in Bar chart

Hi Gysbert, could you share with me how to do the if statement or what to type in the script?

MVP & Luminary
MVP & Luminary

Re: Replace dimension name in Bar chart

LOAD
If(Market = 'Not Applicable', 'HUB', If(Market = 'Papua New Guinea', 'PNG',Market)) as Market,
...other fields...
FROM ...source....


talk is cheap, supply exceeds demand
NurulAin
New Contributor II

Re: Replace dimension name in Bar chart

I tried to follow this script, but when i reload there is an error message as in the picture. what did i do wrong?

LOAD

If(Market = 'Not Applicable', 'HUB', If(Market = 'Papua New Guinea', 'PNG')) as Market

From [C:\Users\nain\Digicel Caribbean Ltd\Performance Transformation Pacific - Documents\03 Reports\05 Tracker WAVE\00 Archive - Latest Data\Latest data - Wave - 20190113 (17h39m).xlsx];

script error.jpg

bvssudhakar
Contributor II

Re: Replace dimension name in Bar chart

Hi @Gysbert_Wassenaar

Can you please write it as calculated dimension also because i want to know how to write in calculated dimension in this type condition 

 

Thank you in advance

B V S Sudhakar

bvssudhakar
Contributor II

Re: Replace dimension name in Bar chart

Hi @NurulAin

 

Can you please share your Script

MVP & Luminary
MVP & Luminary

Re: Replace dimension name in Bar chart

Replace 'Market' with the name of the field that contains the values you want to replace.


talk is cheap, supply exceeds demand
bvssudhakar
Contributor II

Re: Replace dimension name in Bar chart

Hi @NurulAin

Sorry not script, Share your Excel file

MVP & Luminary
MVP & Luminary

Re: Replace dimension name in Bar chart

=If(Market = 'Not Applicable', 'HUB', If(Market = 'Papua New Guinea', 'PNG',Market))
And again use the real field name if it's not named Market.


talk is cheap, supply exceeds demand