BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello All ,

I use the code -

/*Generate a table for the total number of units sold over each week*/
proc tabulate data=WEEK f = comma8.;
class week Laptopmodel;
var UnitsSold;
table week*Laptopmodel,
Unitssold;
run;
proc print data = Tabulate;
run;

This gives me :-

Sorted Sales Data 08:54 Saturday, March 6, 2010 65

----------------------------------
| | UnitsSold
| | |
| |--------|
| | Sum
|-----------------------+--------|
|Week |LaptopModel|
|-----------+-----------| |
|Week1 |AP3965 | 67
| |-----------+--------|
| | AT3600 | 36
|-----------+-----------+--------|
|Week2 |AP3965 | 73
| |-----------+--------|
| | AT3600 | 35
|-----------+-----------+--------|
|Week3 AP3965 | 102
| |-----------+--------|
| | AT3600 | 31
|-----------+----------+--------|
|Week4 AP3965 | 127
| |-----------+--------|
| | AT3600 | 40
----------------------------------

I want to obtain a Histogram that shows me the Number of units sold for two periods - period 1 ( week 1 + week 2 ) and period 2 ( week 3 + week 4 )

Kind Regards ,
mark
2 REPLIES 2
Patrick
Opal | Level 21
Mark

You have seriously to start and invest some time and energy in learning SAS.

There is very good SAS training available, excellent SAS books and white papers and the SAS Online Doc covers more than you ever will be able to digest.

What I feel is not acceptable is you posting question after question showing clearly that you yourself have done little or no own investigation, haven't invested in learning nor spent energy to get your brain up to speed.

If you want other people to do your job, then please offer also part of your salary for the help you get. But even better change your attitude and start learning.

Until you don't get better I will ignore your questions from now on - and I'm almost sure that others will follow.

Sorry to be so hard on you but you really seem to need it!

Cheers
Patrick
deleted_user
Not applicable
Hello Patrick ,

This message encourged me to start by doing on own and I have started learning the working of Proc Tabulate and now am able to play around with the code.I should have first tried on my own and then asked my doubt.

Thank you so much.

Kind regards ,
mark

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1403 views
  • 0 likes
  • 2 in conversation