3

It seems a pretty straightforward rule but I believe I am missing something simple. Let's say I have, in my attributes table, an attribute called "NumberOfFloors", with values between 1 and 35.

I am trying to add colours to the different objects (buildings) by creating rules in the following way:

 1 <= "NumberOfFloors" <= 3
 4 <= "NumberOfFloors" <= 6
 ...

And so on until reaching the higher building.

However, so far, it is displaying all the symbols on the colour of the higher value, represented by this rule 32 <= "NumberOfFloors" <= 35.

What am I doing wrong?

1 Answer 1

4

Try rewriting your rules like this:

"NumberOfFloors" >=1 AND "NumberOfFloors" <= 3
"NumberOfFloors" >=4 AND "NumberOfFloors" <= 6
...
"NumberOfFloors" >=32 AND "NumberOfFloors" <= 35

This should work fine for integer values, such as number of floors in a building. However, if you want to include values between the integers, I would do something like this:

"NumberOfFloors" > 1 AND "NumberOfFloors" <= 4
"NumberOfFloors" > 4 AND "NumberOfFloors" <= 7
...
"NumberOfFloors" > 32 AND "NumberOfFloors" <= 36
1
  • Thanks a lot, Fezter. This, indeed, works. In case anyone is interested, I ended up also going for a more, perhaps, annoying way that also works. Creating individual rules for each number of floors, like this, and assigning the appropriate colour to each of them: "NumberOfFloors" = 18
    – Trikelians
    Jun 21 at 17:39

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.