I am working on a PROC TABULATE report and I nearly have what I need but I am running into the following error when I add too many class levels in the row dimension:
ERROR: Limit of 2147483647 potential interactions within a crossing exceeded for the table statement
Here is a representation of my table:
Everything works fine when I only have "ID", "YEAR", and "NAME" in the rows but the code fails when I add "ADDRESS". I understand this is failing because there are too many unique combinations of class levels when I add "ADDRESS". The table has one row per ID so the YEAR, NAME, ADDRESS, CITY, STATE, and ZIP don't really affect the calculation of Levels A, B, C, D, and E. Is there a way to show YEAR, NAME, ADDRESS, CITY, STATE, and ZIP on the report without SAS factoring these class levels into the interaction and, hopefully, bypass that error? If there is no way of adding ADDRESS, CITY, STATE, and ZIP prior to PROC TABULATE processing, is there a way to insert it into the table post-processing by joining, appending, or concatenating tables?
Thanks for taking the time to read this post. I have been searching for a resolution to this for quite some time and I have had no success.
PROC TABULATE DATA=WORK.A;
VAR ID_NUM;
CLASS ID / ORDER=UNFORMATTED MISSING;
CLASS YEAR / ORDER=UNFORMATTED MISSING;
CLASS NAME / ORDER=UNFORMATTED MISSING;
CLASS ADDRESS / ORDER=UNFORMATTED MISSING;
CLASS CITY / ORDER=UNFORMATTED MISSING;
CLASS STATE / ORDER=UNFORMATTED MISSING;
CLASS ZIP / ORDER=UNFORMATTED MISSING;
CLASS LEVEL_A / ORDER=UNFORMATTED MISSING;
CLASS LEVEL_B / ORDER=UNFORMATTED MISSING;
CLASS LEVEL_C / ORDER=UNFORMATTED MISSING;
CLASS LEVEL_D / ORDER=UNFORMATTED MISSING;
CLASS LEVEL_E / ORDER=UNFORMATTED MISSING;
TABLE
ID*
YEAR*
NAME*
ADDRESS*
CITY*
STATE*
ZIP,
LEVEL_A*
LEVEL_B*
N
LEVEL_C*
N
LEVEL_D*
LEVEL_E*
N
/ INDENT=0 ;
;
RUN;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.