Pivot Tables in SpatialXL

Top  Next

PIVOTT~1_img1

Pivot Tables in SpatialXL

 

Pivot Tables can be linked to the spatial scene in SpatialXL and then be worked with and filtered with the scene updating accordingly.

 

PIVOTT~1_img2

 

First, you would have a layer with geometries in the spatial scene, this layer would have some column with common values to values in the pivot table you will be adding, in this example I have a sheet of some States that I have added as a layer:

 

PIVOTT~1_img3

 

PIVOTT~1_img4

 

Next, I have my pivot sheet, which I created based on data in my Overall sheet:

 

PIVOTT~1_img5

 

PIVOTT~1_img6

 

 

The pivot must have the common values with geometries layer put as row labels, which in this example is the State names. I then added the Industry column in my source sheet as column headers and then did a Sum of the Quantity column:

 

PIVOTT~1_img7

 

Add the pivot as a layer in SpatialXL (It will be non-display of course as it just holds data and no geometries):

 

PIVOTT~1_img8

 

PIVOTT~1_img9

 

Now, we will create a data link between the Pivot layer and the States layer using Relations (see Relations manual for full data on how this tool works). To create relations between layers they must be under the same top-level layer, so we will create a new empty layer to contain these two layers, and then place them inside it:

 

 

PIVOTT~1_img10

 

 

PIVOTT~1_img11

 

PIVOTT~1_img12

 

Now, make sure the top-level layer is highlighted in the layer control then open the Relations tool:

 

PIVOTT~1_img13

 

 

 

PIVOTT~1_img14

 

 

PIVOTT~1_img15

 

Then, create the relation between the two layers by linking on the columns with common values, which is the Row Labels in my Pivot layer and the Name column in my States layer. The Pivot will be the Parent layer and the States layer will be the Child layer:

 

 

PIVOTT~1_img16

 

PIVOTT~1_img17

 

Then click Save and the relation has been created, if you view the Layer Data Grid of the Pivot layer you will see the rows now have children from the states layer linked to them:

 

PIVOTT~1_img18

 

Now that your pivot is linked to your layer with geometries you can apply text labels and themes on this relation. For example, here I will apply a text label on the Grand Total column from the parent Pivot layer:

 

PIVOTT~1_img19

 

PIVOTT~1_img20

 

I can also create a theme on this relation, I will theme on the Grand Total column as well:

 

PIVOTT~1_img21

 

 

PIVOTT~1_img22

 

Now, when I apply filters on my Pivot the values will reflect according on the map:

 

PIVOTT~1_img23

 

PIVOTT~1_img24

 

PIVOTT~1_img25