Exploring, modeling, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Bar chart with grouped quarters

Reply
Frequent Contributor
Posts: 80

Bar chart with grouped quarters

[ Edited ]

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

Attachment
Super User
Posts: 1,230

Re: Bar chart with grouped quarters

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

Frequent Contributor
Posts: 80

Re: Bar chart with grouped quarters

Thanks @MichelleHomes, following the blog now.

Super User
Posts: 1,230

Re: Bar chart with grouped quarters

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

Frequent Contributor
Posts: 80

Re: Bar chart with grouped quarters

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

 

Super User
Posts: 1,230

Re: Bar chart with grouped quarters

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

Frequent Contributor
Posts: 80

Re: Bar chart with grouped quarters

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

Super User
Posts: 1,230

Re: Bar chart with grouped quarters

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

Frequent Contributor
Posts: 80

Re: Bar chart with grouped quarters

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

Ask a Question
Discussion stats
  • 8 replies
  • 414 views
  • 1 like
  • 2 in conversation