Skip to content

Multiple sibling tables

A data grid is used for checking the results of your analysis, or as the mechanism for exporting data from FastStats. If you are planning a marketing message, you may want to refer to an individual’s transactional information, but this may be contained in more than one child table.

In the Holidays training system, the name and address information is held in the People table but information about their holiday bookings, insurance policies and communication history are all held in individual child tables.

In the following example we will show Title, Surname (both from the People table), 1st Destination, 1st Booking Date (both from the Booking table), Last Cover, Last Policy Date (both from the Insurance table).

Setting up multiple sibling tables

To display data from one or more of these sibling tables alongside that of data from the parent table:

  • Drag a Data Grid onto a blank selection window set to the People table level
  • Drag the variables Title, Surname, Destination and Booking Date onto the Data Grid
  • Change the table level of the Data Grid back to People and click the Aggregation button on the toolbar
  • Tick the box Apply Column Aggregation and check the Grouping and Transactional tables are set to People and Bookings respectively
  • Click the Edit Sequence Variable… button and apply Booking Date as the Sequence by variable
  • Click OK

We can now add the two variables from the Insurance table to the Data Grid and a default aggregation will be applied to both of these new columns.

  • Drag the variables Cover and Policy Date on to the Data Grid

To change the default functions applied to the Booking variable columns:

  • Select both Booking variable columns, then right click and select Aggregate to People…

  • Change the function to First and click OK

Repeat this step for the two Insurance variable columns. However, we need to also specify which Insurance variable to order those transactions by - here Policy Date - and select the Last function.

  • Select both Insurance variable columns and right click and select Aggregate to People…
  • Click on the Aggregation Details tab and set the sequence variable to Policy Date

    - Click on the Aggregation Function tab and set the function to Last and click OK - Click the Build button to update the Data Grid

Note

You can use the aggregation options individually on each column to set the sequence variable and the function used.