# GeoAnalytics

Discussion Board for collaboration regarding Qlik GeoAnalytics.

Announcements
Action-Packed Learning Awaits! QlikWorld 2023. April 17 - 20 in Las Vegas: REGISTER NOW
cancel
Showing results for
Did you mean:
Contributor II

## Change labels of map legend

Hi,

I have a question on a map object, my organization doesn't have Qlik geoanalytics extension so I don't know if I'm in the right location.

I have this map regarding soil quality

I would like to change the legend text, instead of 2/5/6/7 it would be 'Très faible', 'Elevé', 'Très Elevé', 'Très Elevé'

I have tried this formula in the label ('étiquette' in my french version) part of the map object :

=if(ClasseP2O5=1,'Très Faible',

if(ClasseP2O5=2,'Très Faible',

if(ClasseP2O5=3,'Faible',

if(ClasseP2O5=4,'Correct',

if(ClasseP2O5=5,'Elevé',

if(ClasseP2O5=6,'Très Elevé',

if(ClasseP2O5=7,'Très Elevé')))))))

but it doesn't work. Is it possible to do so ?

I prefer to color by 'ClasseP2O5' rather than by the appreciation('Très Faible','Faible','Correct','Elevé','Très Elevé' etc ) because if I use the appreciation it's ordered alphabetically so 'Correct' is the first element, while I want'Très Faible'/1 to be my first element .

Thanks,

Anne

Labels (1)
• ### Qlik Sense

1 Solution

Accepted Solutions
Partner - Specialist

Hi,

You can create a field like :

if(ClasseP2O5=1, Dual('Très Faible', 1),

if(ClasseP2O5=2, Dual('Très Faible', 2),

if(ClasseP2O5=3, Dual('Faible', 3),

if(ClasseP2O5=4, Dual('Correct', 4)

if(ClasseP2O5=5, Dual('Elevé', 5),

if(ClasseP2O5=6,Dual('Très Elevé', 6),

if(ClasseP2O5=7, Dual('Très Elevé', 7)))))))) as ClasseP2O5_ch

The dual fonction create a field with text and number. You can display the text and sort by number.

Help users find answers! Don't forget to mark a solution that worked for you!
3 Replies
Partner - Specialist

Hi,

You can create a field like :

if(ClasseP2O5=1, Dual('Très Faible', 1),

if(ClasseP2O5=2, Dual('Très Faible', 2),

if(ClasseP2O5=3, Dual('Faible', 3),

if(ClasseP2O5=4, Dual('Correct', 4)

if(ClasseP2O5=5, Dual('Elevé', 5),

if(ClasseP2O5=6,Dual('Très Elevé', 6),

if(ClasseP2O5=7, Dual('Très Elevé', 7)))))))) as ClasseP2O5_ch

The dual fonction create a field with text and number. You can display the text and sort by number.

Help users find answers! Don't forget to mark a solution that worked for you!
Contributor II
Author

That sounds great thanks ! Before I try it, can I include it in a mapping table ?

analyse_sol_mapping:
Mapping
classe, intitulé
1, Dual('Très Faible', 1)
2, Dual('Très Faible', 2)
3, Dual('Faible', 3)
4, Dual('Correct', 4)
5, Dual('Elevé', 5)
6, Dual('Très Elevé', 6)
7, Dual('Très Elevé', 7)
];

Partner - Specialist

More like :

analyse_sol_mapping:
Mapping

classe,

Dual(intitulé, class) as ClasseP2O5_ch

Inline [
classe, intitulé
1, Très Faible
2, Très Faible
3, Faible
4, Correct
5, Elevé
6, Très Elevé
7, Très Elevé
];

Help users find answers! Don't forget to mark a solution that worked for you!
Community Browser