BookmarkSubscribeRSS Feed
2222
Calcite | Level 5

hello all;

using sas eg, can someone please point me in the right direction... each dataset i have is related to a quarter, and in each qtr's DS there is a variable (cost) that has 10,000 prices for 10,000 different items. id like to make a graph that:

1) takes the average (of those 10,000 products) for each qtr's prices and plots that number on the yaxis and plots the qtr (mar22 for example) on the xaxis, so we can see how the prices are changing each qtr

2) a way of taking every qtr except mar for each year and plotting the average change in qtrs in one bar on the chart and then plotting the mar qtr %changes on another bar in the same graph.

hope this made sense, any help is greatly appreciated.

2 REPLIES 2
PeterClemmensen
Tourmaline | Level 20

Can you post some sample data that resemples your actual data?

 

Makes it much easier to provide a usable code answer.

2222
Calcite | Level 5

hello Peter, thank you for looking at this.

i'm not too sure what to show from the datasets it's just that each ds has a variable called cost, and there is a ds for each qtr which is called sep22 (or whatever the qtr and year for the data is) going back to 2015, so the datasets start at mar15 and each qtr has a dataset, within which there is a variable called cost.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 2 replies
  • 979 views
  • 1 like
  • 2 in conversation