BookmarkSubscribeRSS Feed
Arjun_122
Fluorite | Level 6

Hi everyone

 

 

I want to show all months and one custom category created from Month called Quarter values like "Q1" to "Q4"

 

I want to show these two columns  Month and Quater in  custom bargraph 

 

By default, it should all months and when the user select Q1 from the drop down it should show something like this in the graph i have attached. Any ideas

 

how can we do it?

 

 

 

 

 

Untitled.png1.png

 

 

Thanks In advance

5 REPLIES 5
Sam_SAS
SAS Employee
Did you try assigning your Quarter data item to the Group role of the bar chart?

This would seem to do what you want except that it would also color the bars according to the quarter values.
Arjun_122
Fluorite | Level 6

Yes, It does not work.

 

for example, if I select Q1 from drop down It should group all months of Q1 like in image 1 . and if i will uncheck the q1 option. It should show all the months like Jan-18,feb-18,Mar-18 etc. image 2

Sam_SAS
SAS Employee
When you select Q1, you want to see a single bar for Q1 rather than a bar for each month in Q1?

I'm not sure that would be possible.
Arjun_122
Fluorite | Level 6

yes same,  exactly same 

When we select Q1, we want to see a single bar for Q1

FredrikE
Rhodochrosite | Level 12

Make sure you have two category variables one for quarter and one for month.

Then create a parameter that will contain the value from the drop-down (example: The drop-down contains two values Quarter or Month)

 

Create a new calculated item that check the value of the parameter and then select which category variabel to use, example och calculation:

 

IF [parameter] = 'Quarter' then quarter

ELSE month

 

Use this new item as category in your graph.

 

In your example you have two different graphs and that is not possible since you can not change visualization upon a value in a list box.

 

Am I somewhat on it?

//Fredrik

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 5 replies
  • 1227 views
  • 0 likes
  • 3 in conversation