Tables and axes > Include and substitution > Grid tables > Grid axes in levels jobs
 
Grid axes in levels jobs
Grid axes in levels jobs work exactly the same as grid axes in ordinary jobs. To create a table at one level and update its cells at a lower level, define the table creation level with anlev= on both the tab and l statement. Define the update level with uplev= on the l statement. For example:
tab gax1 grid;anlev=person
l gax1;anlev=person;uplev=shop
n01Safeway;col(a)=208
n01Tesco;col(a)=209
n01Co-op;col(a)=210
side
col ca00;Base;Banana;Strawberry;Peach;Pineapple
This table is created at person level and updated at shop level. It tells you how many people bought each flavor of yogurt in each shop.
You can create the same table using anlev= and celllev= on the tab statement and anlev= by itself on the l statement:
tab gax1 grid;anlev=shop;celllev=person
l gax1;anlev=shop
n01Safeway;col(a)=208
n01Tesco;col(a)=209
n01Co-op;col(a)=210
side
col ca00;Base;Banana;Strawberry;Peach;Pineapple
This table is created at shop level, but its cells are updated once per person after all data for that person has been read.
See also
Grid tables