7

I'm trying to label visited countries in a world map shapefile, what is wrong with my rule :

if( "Visited" = 'yes', "NAME", NULL)

enter image description here

5
  • 1
    Your rule is valid, are all the 'yes' values lower case or is there a mixture?
    – Joseph
    Aug 10, 2017 at 14:48
  • all are lower case
    – Nordinator
    Aug 10, 2017 at 14:50
  • 1
    Can you post a screen of your label configuration and attributes windows ? Maybe we will see something not right.
    – gisnside
    Aug 10, 2017 at 14:50
  • 1
    What is the issue that you are experiencing?
    – MaryBeth
    Aug 10, 2017 at 14:51
  • Screen posted sorry it's french
    – Nordinator
    Aug 10, 2017 at 14:57

2 Answers 2

10

Your formula goes to "label with" ... not in the "filter" field ...

Labelling

4
  • it seems like it, so can you explain what filter is used for? please
    – Nordinator
    Aug 10, 2017 at 15:04
  • 1
    Yes ! That's the reason :) Good shot ! I added a screenshot to your answer. @Nordinator, he's got it right you should change the V tick to his answer
    – gisnside
    Aug 10, 2017 at 15:05
  • perfect, clean, straight to the point
    – Nordinator
    Aug 10, 2017 at 15:08
  • Your initial formula already contains a 'filtering' condition so u're able to leave the filter field blank (if u want ...)
    – Snaileater
    Aug 11, 2017 at 10:31
8

As alternate solution, instead of using rule-based labelling, you can put your formula in the normal labelling field like below.

labelling

1
  • Avec plaisir ;) Don't forget to click the upper arrow also in front of my post if it helped you :)
    – gisnside
    Aug 10, 2017 at 15:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.