3

I am trying to categorise my site points by species group with rule based symbology;

e.g. bat uses the formula

"Group"='Bat'

But I would also like to have a different symbol for where there are no bats recorded at that site (i.e. based on the abundance in a separate column which is taken from a join with another table). I have tried this below but it hasn't worked, does anyone know how to fix this?

"Group"='Bat' AND "records_Abundance" = '<= 0' (for sites where species not present)

"Group"='Bat' AND "records_Abundance" = '>= 1' (for sites where species are present)

It seems to only read the abundance part and either turns all my points for all species to the symbol or none at all?

  • 1
    I'd rather use if(records_Abundance LIKE '<=0',0,2) as condition for the size of the point-symbol - it gives no symbol, when the amount of bats is 0, else it gives a symbol 2 units wide. Also, for me CASE WHEN group='Bat' AND records='<= 0' THEN TRUE END does work - as well as any variations with spaces and/or quotation marks. – Erik Nov 12 at 12:26
  • 3
    just use "Group"='Bat' AND "records_Abundance" = '<= 0' without CASE WHEN – eurojam Nov 12 at 12:27
  • It still doesn't work. the records_Abundance column is from a join from a different table, is this a problem? Because I don't know what else might be wrong with it? – Janine McMahon Nov 12 at 12:33
  • Also, I need a symbol for the project site for if it does or does not have species present so have two different symbology expressions for each because they will have different symbols – Janine McMahon Nov 12 at 12:36
  • 1
    @JanineMcMahon - You could create a new field and copy the values over from the joined field by using the name of the field as the expression (e.g. "records_Abundance"). – Joseph Nov 13 at 10:24
1
"Group"='Bat' AND "records_Abundance" <= 0 (for sites where species not present)
"Group"='Bat' AND "records_Abundance" >= 1 (for sites where species are present)

do not need the <= or >= in quotations

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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