Monday - last edited Tuesday
How do I include a variable in the proc tabulate table statment and have the output simply print the values of the variable instead of computing a statistic on version 9.4? Right now, I am getting a sum of the diff variable for each month since it's the default.
proc tabulate data=weather;
class precip month;
var temp diff;
table month*precip,temp*(max) diff;
It's very difficult to picture how your report would make any sense. Is DIFF constant for an entire month? If that's the case, here are some ideas you can play with to see if they come closer to what you are looking for:
tables month*precip, temp*max diff*mean;
tables month, precip*temp*max diff*mean;
Do you have the same value of DIFF for all records within a month*precip combination (and I won't really mention how odd it looks to see Precip which I would almost always see as a var variable in any of my data used as a class variable). If so perhaps DIFF should be a class variable on the row dimension.
A very good idea when dealing with data dependent questions is to post an example input data set to show us what you have and then show what the desired result for that example data should be. Instructions here: https://communities.sas.com/t5/SAS-Communities-Lib
In some very specific cases I have gotten an appearance similar to what you are requesting by using a statististic with variables in the role of your Diff but that was because I knew I was going to use tabulate to display the values and the data was structured to work with Proc Tabulate rules [In my case only one record per combination of the row class values had non-missing value for the variable in question]. Max or Min would be likely candidate statistics.