Hey @Stol,
your approach seems to be good so far. How do you know the year of the document/file? Do you have a dedicated year column? If this is the case, you can use the Year column and the Term as Strings column as pivots.
Set the column name on the bottom of the configuration of the Pivoting node to Pivot+Aggregation column and check the Sort lexicographically box. The columns will then probably be sorted by year, so you might resort them afterwards, if you want to have them sorted by term (like you have it in the example table).
Best,
Julian