BookmarkSubscribeRSS Feed
prsr
Fluorite | Level 6

Hi there,

Pls assist.

I am trying to achieve dual axis bar and line chart in SAS VA.

 

AS IS: My graph looks as below - 

prsr_1-1719774859223.png

TO BE: I am trying to overlay the above with a line based on the count. Something like below - 

prsr_2-1719775029159.png

 

Thanks in advance

RP

 

3 REPLIES 3
BrunoMueller
SAS Super FREQ

This is possible using the SAS Graph Builder.

BrunoMueller_0-1720091604318.png

 

In the SAS Graph Builder you will find a "template" called "Dual Axis Bar-Line Chart"

BrunoMueller_1-1720091731260.png

Use it as starter, add the group role to the the bar chart

BrunoMueller_2-1720091915968.png

The default for group display is cluster, as you need it.

 

Save the graph template, you will be asked to remove the data driven lattice roles.

 

In a SAS Visual Analytics report import the graph template

BrunoMueller_0-1720092348008.png

You are now ready to use the graph template like any other object

BrunoMueller_1-1720092542793.png

 

 

prsr
Fluorite | Level 6

Hi Bruno, Thanks for your reply. I really appreciate your time. 

I tried the way you mentioned, Is there a way to -

1) apply data labels for the bars and line

prsr_0-1720123733413.png

 

2) apply group scale to "Normalize groups to 100%"

prsr_1-1720123772796.png

 

Thanks,

RP

BrunoMueller
SAS Super FREQ

I see. These options are not currently available for custom graphs, but can be set while building the custom graph.

 

Here are the basic steps:

  • create a new custom graph using the "New Custom Graph" button
  • From the elements on the left add bar chart
  • Go to the options of the bar chart on the right, set grouping scale and data label as shown
    BrunoMueller_0-1720450289229.png

     

  • Add the group role to the bar chart as shown before
  • Add a line graph on top of the bar chart
  • Set options of the line chart accordingly (choose right Y axis for the line chart)
    BrunoMueller_1-1720450608921.png
  • Maybe rename the "shared" role to category
  • Check what you would like to have in the legend
    BrunoMueller_2-1720450720740.png

     

Proceed as mentioned before (save custom graph, import it, use it).

It will look like this:

BrunoMueller_0-1720451178681.png

 

 

If you need to make changes to the custom graph. Delete it from the object window. Make the changes. Import it again. Build new report object.

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