Hiding points in shapefile layer using QGIS

Another way, using the same method as presented above by Joseph, with a slightly shorter code:

if(LABEL % 10 = 5,"","LABEL")    

When the remainder of dividing by 10 is 5 (so 5, 15, 25...) it won't show the point. enter image description here


We can use the modulus operator % to calculate the remainder values when dividing by 5. If there is no remainder then it is removed from the display. However, because multiples of 10 can be divided by 5 with no remainder, we will have to exclude this by adding some logic to the expression:

if("LABEL" % 5 = 0 AND NOT "LABEL" % 10 = 0, "LABEL" % 5 AND NOT "LABEL" % 10, "LABEL")

Excluding values ending in 5