[Qgis-user] NULL value in a table

Ujaval Gandhi ujaval at spatialthoughts.com
Tue Jan 11 02:35:04 PST 2022


This looks like a bug, but I could find a workaround. In the Print Layout
Table's Item Properties, choose 'Attribute' and for the column that you
have NULL values, enter an expression like below under the 'Attributes'
heading. Replace 'my_col' with the name of your attribute.

CASE WHEN "my_col" is NULL
THEN NULL
ELSE "my_col"
END

After you enter the expression, change the 'Heading' to the original column
names. Now you should have blank entries where there were NULL values.

[image: Logo] <https://spatialthoughts.com/>
Ujaval Gandhi
Spatial Thoughts
mobile: +91-8095684687
email: ujaval at spatialthoughts.com
[image: LinkedIn icon] <https://www.linkedin.com/in/spatialthoughts/>  [image:
Twitter icon] <https://twitter.com/spatialthoughts>



On Mon, Jan 10, 2022 at 10:30 PM Dario C <dario955i at gmail.com> wrote:

> Hi,
> I have a table in my layout, which has  a column set as integer. Is there
> any chance to have void attribute where I have NULL values? At the moment I
> have everything with "0".
>
> Thanks
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20220111/32ae2cc7/attachment.html>


More information about the Qgis-user mailing list