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

 

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

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