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

How to show dynamic category in bar graph?

Reply
Occasional Contributor
Posts: 6

How to show dynamic category in bar graph?

[ Edited ]

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

SAS Super FREQ
Posts: 322

Re: How to show dynamic category in bar graph?

Posted in reply to Arjun_122
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.
Occasional Contributor
Posts: 6

Re: How to show dynamic category in bar graph?

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

SAS Super FREQ
Posts: 322

Re: How to show dynamic category in bar graph?

Posted in reply to Arjun_122
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.
Occasional Contributor
Posts: 6

Re: How to show dynamic category in bar graph?

yes same,  exactly same 

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

PROC Star
Posts: 403

Re: How to show dynamic category in bar graph?

Posted in reply to Arjun_122

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

Ask a Question
Discussion stats
  • 5 replies
  • 149 views
  • 0 likes
  • 3 in conversation