BookmarkSubscribeRSS Feed
balraj
Quartz | Level 8

Hi Community,

 

We have a data as follows

date state sales
ddmmyyyy a 10
ddmmyyyy b 20
ddmmyyyy c 30
ddmmyyyy d 40
ddmmyyyy e 50
ddmmyyyy a 10
ddmmyyyy b 5
ddmmyyyy c 11
ddmmyyyy d 14
ddmmyyyy e 18

 

Now how to convert the date so that i can plot a bars chart(grouped bars) for comparision of sales for each quarter(i.e. of previous and current year quarter) with state as category  using SAS Report Designer v7.3.

 

 

 

Kind Regards,

Balraj.P


chart.png
8 REPLIES 8
MichelleHomes
Meteorite | Level 14

Instructions on how to work with dates as SAS dates in SAS Visual Analytics can be found in Bobbie Wagoner's very good blog post
Making Best Use of Date Formats in Visual Analytics Designer

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com
balraj
Quartz | Level 8

Thanks @MichelleHomes, following the blog now.

MichelleHomes
Meteorite | Level 14

If you select a quarter SAS date format you should be able to achieve the bar chart your after.

 

Please let us know how you go and mark the question as answered if it is.

 

Kind Regards,

Michelle

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com
balraj
Quartz | Level 8

Hi @MichelleHomes,

 

I've done as given in the blog, but the data is coming as sum of 2 year in single bar, where as both should be shown in different bars.

Category used is the Continent. If I use date then its showing differently.

Any work around for this?

 

Regards,

Balraj P

 

MichelleHomes
Meteorite | Level 14

Hi Balraj,

 

it it is difficult to understand and visualise what you are wanting and what you are getting. Are you able to provide screenshots to describe the scenario better? 

 

Kind Regards,

Michelle

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com
balraj
Quartz | Level 8

Hi @MichelleHomes, this is my sample data

data1.png

 

I would like to two different bars for each year grouped by quarters. Where as the chart will have "area" as its category.

Kind Regards,

Balraj P

MichelleHomes
Meteorite | Level 14

Sorry Balraj - it isn't clear from sample data screenshot what you want in your visualization. Perhaps you can draw what you want and explain what you mean by "area". For the community to assist, we need to have a clearer understanding of your requirements.

 

From what I understand you may need to also duplicate your Transaction Date column so that you have 2 date columns. One of them use a format for year and the other date column use a format for quarter. This way you can use the quarter column for grouping.

 

Kind Regards,

Michelle

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com
balraj
Quartz | Level 8

Hi @MichelleHomes,

 

First up, your guidance is doing wonders for me. Have a look at this chart and guide me.

 

chart.png

 

Kind Regards,

Balraj P

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 8 replies
  • 1569 views
  • 1 like
  • 2 in conversation