BookmarkSubscribeRSS Feed
boin
Obsidian | Level 7

I have the attached data set and i am trying to get the output group by weekday , hour and sum energy with in that hour , for that weekday.

 

any help would be appreciated . 

 

 

4 REPLIES 4
ballardw
Super User

Many users here don't want to download Excel files because of virus potential, others have such things blocked by security software. Also if you give us Excel we have to create a SAS data set and due to the non-existent constraints on Excel data cells the result we end up with may not have variables of the same type (numeric or character) and even values.

 

Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the </> icon or attached as text to show exactly what you have and that we can test code against.

Kurt_Bremser
Super User

If you have an Excel issue, you should go to a Microsoft-oriented forum.

If you need SAS help, post example datasets as DATA step code with DATALINES, and the expected result. We can then recreate your dataset exactly in our environment for development and testing with just a simple copy/paste and submit.

mkeintz
PROC Star

Help us help you.  Please post you sample data in the form of a working SAS data step.

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
Tom
Super User Tom
Super User

I am not sure what you mean.  And looking the spreadsheet you posted I am not sure what types of variables you have or even what the variable names are.

 

Tom_0-1717981857923.png

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 829 views
  • 0 likes
  • 5 in conversation