BookmarkSubscribeRSS Feed
Jianan_luna
Obsidian | Level 7

I want to do a data visualization for a data set, including variables: age, gender, sub_department and profit. I tried so many times using boxplot, bar_char and even facet graph, but all method doesn't work. My goal is:  how does the profit distribute among different sub_department for each combination of age and gender(like group 20-29F, 20-29M). The question is kind of tricky, because I want to analyze those 4 variables in one graph. Could you please help me solve this problem? The following is the data file. Thanks so much

10 REPLIES 10
PetriRoine
Pyrite | Level 9

Hello @Jianan_luna ,

 

This was the first thing that came in to my mind. 

Capture.PNG

 

 

Best regards,

Petri

FalkoSchulz
SAS Employee

you could also try grouping the bars (e.g. by gender) along with lattice (either columns or rows) to further compress the information. Similar what @PetriRoine showed - just with additional stacked grouped bars. So something like the following:11-23-2020 8-07-35 PM.png

Hope this helps. Falko

Jianan_luna
Obsidian | Level 7
Thanks so much Sir, it's excellent! Can you please instruct me how to do this by SAS?
PetriRoine
Pyrite | Level 9

Hello @Jianan_luna 

 

Both, @FalkoSchulz and I use the the Bar chart as basis. Look at Falco's image how he applied the roles - you can see them on the right side of his image. He used Gender in Group role. I used Gender in Lattice rows role.

 

Best regards,

Petri

Jianan_luna
Obsidian | Level 7
Thanks so much Sir, can you please let me know how to do this?
FalkoSchulz
SAS Employee
Not sure what version of Visual Analytics are using - but you could have a quick look at a basic tutorial https://video.sas.com/detail/videos/version-8.5_/video/6106564224001/creating-a-basic-report-in-sas-... on how to add visualizations and assign roles as well. As Petri mentioned, you can see the role assignments for your data set in my last screenshot. Let us know how you go. Falko
Jianan_luna
Obsidian | Level 7

Jianan_luna_0-1606195163416.png

Thanks so much Sir, I got it, but the sample size is too big, and the age_range is so crowded, so it cannot show the whole range. Is there any way can make the x-axis much longer? or separate the graph to two part? Thanks so much!

FalkoSchulz
SAS Employee

Well rendering depends on the cardinality of your data items. You can play around with lattice rows vs columns and also related group role assignments. Lattice rows may work better as you would provide more horizontal room for each group segment. See what works best.

 

In the end - the overall size of the visualization decides how much real estate is available for rendering. The graph automatically removes things like labels, tick values or legends if there isn't enough room for rendering. You can try 'maximizing' (top right menu), opening view mode or increasing report size to provide more room if required.

 

Hope this helps. Falko

Jianan_luna
Obsidian | Level 7
Thanks so much Sir
PetriRoine
Pyrite | Level 9

@Jianan_luna, one thing that you could maybe do is to offer report viewers possibility to narrow down uninteresting sub_departments. F.ex. add a List control object and assign sub_department to it. Then create an action from the List to Bar chart

 

Best regards,

Petri

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
  • 10 replies
  • 2246 views
  • 1 like
  • 3 in conversation