MapInfo Pro

 View Only
  • 1.  Displaying labels based on specific value

    Posted 02-26-2021 06:12
    Hi

    I am sure this should be really easy, and I may even have done it before, but I can't work out how to do it now.

    I would like to show labels, but only for objects above a certain value. eg only display the population of a country where it's more than 5 million. 

    I know I can query the table, and label the QUERY rather than the original table, but is there a way to make the query using an "expression" to label the original table?

    Thanks 
    Caroline

    ------------------------------
    Caroline Hilton
    Pelican GeoGraphics Ltd (VAR)
    Petersfield
    ------------------------------


  • 2.  RE: Displaying labels based on specific value

    Posted 02-26-2021 07:25
    Caroline

    in the expression builder for that layer and assuming the column is called population use :

    IIF(population > 5000000, population, "")

    you can get slightly cleverer than that and use the Cond() function if you want to do different labels for multiple different values. 

    HTH

    Nick

    ------------------------------
    Nick Hall
    Mapchester LTD
    nick.hall@mapchester.co.uk
    ------------------------------



  • 3.  RE: Displaying labels based on specific value

    Posted 02-26-2021 08:40
    Thanks Nick. I knew there was a way. Perfect!

    ------------------------------
    Caroline Hilton
    Pelican GeoGraphics Ltd (VAR)
    Petersfield
    ------------------------------