Skip to main content
clarifications
Source Link
Kasper
  • 3.6k
  • 1
  • 4
  • 20

You can use thea Fixed table to do that, instead of an Attribute table.

Add lines/columns according to your needs, and in the surface expression, use the relevant expressionsformulas for 'circles', 'squares' (I have 'rect' and 'hex' here): with a filter on "desc" = 'circle', 'square', or no filter at all forassumming that the total sum.layer is named 'shapes':

For Circles: aggregate('shapes','sum',$area,filter:="desc"='circle')

For Squares: aggregate('shapes','sum',$area,filter:="desc"='square')

For the Total: aggregate('shapes','sum',$area)

As this Table is not tied to a particular layer, the aggregate function does the job to :

  • select the appropriate layer,
  • do the math: function/expression (sum the $area),
  • and filter on "desc" properties to get the desired subset/total

enter image description here

enter image description here

You can use the Fixed table to do that.

Add lines/columns according to your needs, and in the surface expression, use the relevant expressions for 'circles', 'squares' (I have 'rect' and 'hex' here): with a filter on "desc" = 'circle', 'square', or no filter at all for the total sum.

aggregate('shapes','sum',$area,filter:="desc"='circle')

aggregate('shapes','sum',$area,filter:="desc"='square')

aggregate('shapes','sum',$area)

enter image description here

enter image description here

You can use a Fixed table to do that, instead of an Attribute table.

Add lines/columns according to your needs, and in the surface expression, use the relevant formulas for 'circles', 'squares' and assumming that the layer is named 'shapes':

For Circles: aggregate('shapes','sum',$area,filter:="desc"='circle')

For Squares: aggregate('shapes','sum',$area,filter:="desc"='square')

For the Total: aggregate('shapes','sum',$area)

As this Table is not tied to a particular layer, the aggregate function does the job to :

  • select the appropriate layer,
  • do the math: function/expression (sum the $area),
  • and filter on "desc" properties to get the desired subset/total

enter image description here

enter image description here

Source Link
Kasper
  • 3.6k
  • 1
  • 4
  • 20

You can use the Fixed table to do that.

Add lines/columns according to your needs, and in the surface expression, use the relevant expressions for 'circles', 'squares' (I have 'rect' and 'hex' here): with a filter on "desc" = 'circle', 'square', or no filter at all for the total sum.

aggregate('shapes','sum',$area,filter:="desc"='circle')

aggregate('shapes','sum',$area,filter:="desc"='square')

aggregate('shapes','sum',$area)

enter image description here

enter image description here