[Qgis-user] Filtering NULL values from WFS
chris hermansen
clhermansen at gmail.com
Tue Aug 26 08:44:34 PDT 2025
Michael and list
On Tue, Aug 26, 2025, 07:54 Reetz, Michael (NLPVW) via QGIS-User <
qgis-user at lists.osgeo.org> wrote:
> Hello group,
>
>
>
> I’ve added a WFS-layer to a project try to define filters on different
> attributes. It seems not to be possible to filter for NULL values.
>
>
>
> Example:
>
> - 1932 records in total
> - 376 records with a value in a date attribute
> - 20 records with 2005-12-31 as value
>
>
>
> If I set the filter to "end_date" = '2005-12-31' the result is 20 records.
>
> If I set the filter to "end_date" != '2005-12-31' the result is 356
> records. So only records that have an end date are recognized. Record with
> NULL as end date are ignored.
>
>
>
> Filtering in the attribute table with “is_empty_or_null” works but only
> for selection.
>
>
>
> Is this “normal” behaviour with WFS layers or is there a way to define a
> filter string that work for all records?
>
Have you tried
end_date IS NULL
Generally speaking (I'm not sure about this specific case) null is neither
equal nor unequal hence the need for a different logical operator, IS.
Can you combine conditions for example
end_date IS NULL or end_date = '2005-12-31'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20250826/b4f623b3/attachment.htm>
More information about the QGIS-User
mailing list