BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

In the problem that i asked in last post , I used the code -

proc tabulate data=Week OUT=WEEKOUT;
class Product;
VAR REVENUE ;
TABLE Week
*Product all
,
n='Total_Units_Purchased'*f=comma9.
pctn
Revenue*mean*f=dollar9.0
;
run;

Kindest regards,
Mark
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
Thank you for posting your code. However, let's get this code in the same vicinity as the data you just posted:
DATA:
[pre]
product Units_Purchased REVENUE
1 1 699.99
1 2 699.99
1 1 699.99
1 1 699.99
2 2 699.99
2 1 699.99
2 2 699.99
[/pre]

CODE you said you tried:
[pre]
proc tabulate data=Week OUT=WEEKOUT;
class Product;
VAR REVENUE ;
TABLE Week*Product all,
n='Total_Units_Purchased'*f=comma9.
pctn Revenue*mean*f=dollar9.0;
run;
[/pre]

What is interesting to note is that the code you posted shows the use of a variable called WEEK, although your data does NOT show the WEEK variable -and- your code does not list the WEEK variable in a CLASS or VAR statement.

Thus, I would expect that you are experiencing this same error:
ERROR: The type of name (Week) is unknown.
as you showed in this previous forum posting:
http://support.sas.com/forums/thread.jspa?messageID=39693鬍 (on July 15) and which someone already posted a response to.

And, as Scott pointed out, we have seen some of your questions with this data before:
http://support.sas.com/forums/message.jspa?messageID=32184
http://support.sas.com/forums/thread.jspa?messageID=32298
http://support.sas.com/forums/thread.jspa?messageID=33111
http://support.sas.com/forums/thread.jspa?messageID=33390

Where does the WEEK variable come from??? The data you posted really won't work in the TABULATE code you posted without the WEEK variable. Perhaps the code you posted isn't the code you used for the PRODUCT, REVENUE and UNITS_PURCHASED data???

cynthia

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1991 views
  • 0 likes
  • 2 in conversation