Expression - symbols

52 views
Skip to first unread message

Stéphane Parrenin

unread,
Dec 10, 2022, 7:42:11 PM12/10/22
to australian-qg...@googlegroups.com
Good mooning all,

I’d like to write an expression to remove the symbol for one particular label, as below:

CASE
WHEN  "Name"  =  'Sydney' 
THEN 'Square'
ELSE 0
END

I have also tried with ELSE “No Symbols” but that does not work either.

Grateful if someone could let me know what I should write after ELSE.

Many thanks,
Stéphane

John Bryant

unread,
Dec 11, 2022, 1:07:57 AM12/11/22
to australian-qg...@googlegroups.com
Hi Stéphane,

Feels like there might be a few ways to do this but I'm not 100% sure exactly what you want to do.

One way might be to create a rule-based symbol on your layer with a filter to include only features where "Name"  =  'Sydney', and don't add any other rules (ie. don't symbolise anything that doesn't match the rule).

image.png


--
You received this message because you are subscribed to the Google Groups "QGIS Australia User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to australian-qgis-use...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/australian-qgis-user-group/50D548BF-FBA6-4D0C-B659-03645AD46B6A%40gmail.com.

Stéphane Parrenin

unread,
Dec 13, 2022, 2:31:50 AM12/13/22
to australian-qg...@googlegroups.com
Thanks John, it works!, I have also managed to remove symbols using an expression in the size box, where the size of the symbol I want to remove is “0. That works too!

Rgds,
Stéphane

On 11 Dec 2022, at 4:07 pm, John Bryant <johnw...@gmail.com> wrote:

Hi Stéphane,

Feels like there might be a few ways to do this but I'm not 100% sure exactly what you want to do.

One way might be to create a rule-based symbol on your layer with a filter to include only features where "Name"  =  'Sydney', and don't add any other rules (ie. don't symbolise anything that doesn't match the rule).

<image.png>


On Sun, 11 Dec 2022 at 08:42, Stéphane Parrenin <st3phane...@gmail.com> wrote:
Good mooning all,

I’d like to write an expression to remove the symbol for one particular label, as below:

CASE
WHEN  "Name"  =  'Sydney' 
THEN 'Square'
ELSE 0
END

I have also tried with ELSE “No Symbols” but that does not work either.

Grateful if someone could let me know what I should write after ELSE.

Many thanks,
Stéphane

--
You received this message because you are subscribed to the Google Groups "QGIS Australia User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to australian-qgis-use...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/australian-qgis-user-group/50D548BF-FBA6-4D0C-B659-03645AD46B6A%40gmail.com.

--
You received this message because you are subscribed to the Google Groups "QGIS Australia User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to australian-qgis-use...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages