A matrix table is a table that expands both horizontally and vertically. The amount of rows and columns is determined by the number of unique values in the specified fields.
Matrix tables are generally ‘look up’ tables. In the following example, the two products are available in three ‘colours’, two ‘finishes’ (‘gloss’ and ‘matt’) and each variant is a slightly different price. The reader can find the finish and colour they’re looking for in the table’s columns, then look down the row for the part number they want to purchase. The price of the item is shown where the column and rows intersect.
The data used to produce this table is shown below:
Each variant has its own record in the panel, so there’s a record for each ‘part number,’ ‘colour’ and ‘finish’ permutation. If one of the records is missing (say, for instance, part number 5678 isn’t available in ‘white’) EasyCatalog will leave the cell blank or optionally apply a cell style to the empty cell, or insert text such as ‘N/A’.
Matrix tables can be configured by specifying parameters via the table’s Script Label (further details here) or by using the new “Matrix Table Options” dialog in CC 2019 (further details here):
In the above example, we’re specifying that we want one row per unique value in the ‘part number’ field; one column per unique value in the ‘colour’ field within each ‘finish’ group. In the InDesign table header, the “Merge With Next” horizontal cell merging option was used in the ‘finish’ cell to merge the header across all three columns with the same ‘finish’ value.