[Solved] [Map chart] On a feature layer aggregate data from a different table

Hi everyone,

I'm facing this activity (see the picture attached):

  • I have a table of geopositioned sensors and the related measured value (for example power consumption)
  • I have a shape file that represents the municipalities in which the sensors are
  • I would color the geometries with statistical information coming from the sensor (i.e. the average of the  energy consumed in that area)

If I try to use the "color by" feature using data that are not present on the shapefile table I receive the error: "Categorical expression can only reference columns in the main data table" .

Any suggestion on how to cope with this?

[SOLUTION] I needed to select the data table as the main table in the visualization and join the data table with the shapefile table so that each row is associated with the geometry connected... 


(1) Answer