Learn · Data and analysis · Lesson 26 of 35
Link tables by a key
You willJoin two tables by the column they share, then colour the map by a column of the other table, group a chart by it and use it in formulas.
Time4 min
Why it mattersSchools in one file, enrolments by year in another: linked by the school code, they work as one.
Try it in Plotlay → Opens an example project with this lesson beside it. Nothing to install.
Steps
- Open Data (Alt+5), then Analysis, and add the second table: paste it or open a CSV or Excel file.
- Choose Links between tables in the list. Every table, data layer and linked dataset is a card with its columns.
- Drag the key column of one card onto the matching column of another, or choose Link two tables and fill in the sentence: Each row in Schools matches rows in Enrolments by key = school_code.
- Read the match report before you choose Link tables: how many keys matched, the ones that didn’t with the closest key, and whether each school has one row or many.
- Under the link, pick a column and how its rows combine (total, average, median, lowest, highest, count or latest), then Colour the map. A table by year steps with the time slider.
- Make a chart of the second table: its columns now include Schools.level, to group or filter by.
Tips
- Keys match after tidying: spaces, capitals, dashes and leading zeros don’t count, and 8135 matches "8135".
- In a formula, Schools.level reads the one linked row, and sum(Enrolments.students), median(...) or count(Enrolments) combine the many.
- A key made of two columns (a state and a school code): choose + A second key column.
- Links can go one more step: an enrolment row reaches a school, and the school reaches its suburb’s table.
Common mistakes
- Linking two tables where keys repeat on both sides: the link says Many to many, and totals would count rows more than once. Link each to a table with one row per key instead.
- Reading a many side as one value: Enrolments.students alone fails on a school with several rows. Combine it, as sum(Enrolments.students).
Words in this lesson
- Layer
- A group of shapes, rooms and items in a project, listed in the Layers tab. A hidden layer is left out of the plan, 3D and documents until you show it again.
Related lessons
Add a table and read its numbersPaste a table from Excel or open a file, then read its count, median, mean, highest and lowest at a glance.2 minGroup and filter a summaryCompare groups side by side and count how many are over or under a value, for only the rows you choose.3 minColour by value, and the time sliderThe shapes shaded by any column, in classes and colours you choose, stepping through hours, days or years on a slider.3 min
Steps checked in the app on 13 November 2026.