02-26-2018 10:47 AM
How do I create a proc tabulate with 23 columns (each column is a different variable)? I get an error saying their are too many dimensions when using a small sample below.
proc tabulate data=test.testing;
var F1 F1V F2 F2V;
table (pdte="2") *
02-26-2018 12:15 PM
I'm not sure I can take you through all the steps you need to get a working program. But I can at least answer this question and leave the subsequent questions to you.
PROC TABULATE allows just three dimensions. You can define the pages, the rows, and the columns. Within a TABLE statement, the comma is a key symbol that separates one dimension from the next. So you can use at most two commas in a single TABLE statement.
To make PDTE the rows, and add a separate column for each of your variables, the TABLE statement would look more like this:
F1="1" F1V="2" F2="3" F2V="4";
The spacing and indentation are arbitrary ... whatever is easily readable is OK.
02-26-2018 12:21 PM
That makes sense, thank you. I need to get the data currently in a dataset into a format where I can automate it into excel. Without using a Tabulate, im not sure how else I would go about doing it, any ideas at all please?
02-26-2018 12:49 PM
I'm not an Excel user, so can't be that much help. But I would guess the easiest thing to port over to Excel would be a SAS data set. Why try to port over a report (which can take on many different forms), when you can port a data set?