0

I use QGIS and I am trying to create a symbology expression that is based on the condition of one field that will result in the showing of the symbology which is based on the value of another field.

Currently, my expression is:

"tpz" * 2

which shows the radius of a value in the tpz field. What I wish to do is only show this radius when the value of my retention field is showing the value retain.

3
  • 1
    Have you read up on how if() expressions work, especially in QGIS?
    – Erik
    Commented Mar 25, 2023 at 9:33
  • Sorry, didn't really understand your question, what you want to achieve. You should reformulate it.
    – Babel
    Commented Mar 25, 2023 at 10:21
  • Use « if » or « case when » formulas. Or as Babel said, explain your problem more precisely.
    – katagena
    Commented Mar 25, 2023 at 10:27

2 Answers 2

2

If i understand your question, you can put the symbology logic without conditions in the formula, and put an expression in the opacity, expression base on the other field like : if (retention = a value, 100, 0)

If retention is equal to the value, it is visible (opacity = 100), else it is invisible.

1

I agree with others that the question isn't very clear. Whether categorized, graduated, or rule-based; the same expression should work:

if(
    lower("retention") = 'retain',
    "tpz" * 2,
    NULL
)

Once the expression is applied, then the value can be classified accordingly.

Your Answer

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

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