BookmarkSubscribeRSS Feed
jbrock
Fluorite | Level 6

Hello,

I have a dataset containing observations over the course of 3 years. How can I calculate the average number of observations by month? So, for instance, I have a number of observations from January 2015, 2016, and 2017. How can I calculate the 3-year average value of observations that occurred in January (and every other month)?

I hope to end up with average as a separate value that I can plot on a bar chart.

A small sample of my dataset is attached.  I am basing all of my date calculations on DtSpec2.

Thanks!

1 REPLY 1
PaigeMiller
Diamond | Level 26

This was answered in your other thread, in particular in message 16 https://communities.sas.com/t5/Graphics-Programming/Add-average-line-to-bar-chart/m-p/615663#M19297

--
Paige Miller

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1 reply
  • 754 views
  • 0 likes
  • 2 in conversation