BookmarkSubscribeRSS Feed
vallsas
Pyrite | Level 9

hi,

 

Can we display percentage on key value. (i have a barchart object displayed the numbers based on the filters so would like to display the percentage of the values displayed on barchart).

 

thank you.

2 REPLIES 2
Patrick
Opal | Level 21

You need to provide a bit more detail like: SAS9.4 or Viya, VA or SAS Graph?

One option is always to verify if one of Robert Allison's examples already covers what you need and then "draw the inspiration" for your code from there.

https://robslink.com/SAS/Home.htm 

https://blogs.sas.com/content/author/robertallison/ 

vallsas
Pyrite | Level 9

i am trying calculate the percentage in sas viya va 8.3 and using the barchart to display the count of each product and I would like to display the percentage downside of the bar chart . my problem is if select the SLA then i get key value as 100% I want only 71%, see the percentage calculation below 

 

vallsas_0-1661060847123.png

 

vallsas_1-1661060939901.png

Sum [_ByGroup_] ('Frequency'n) / AggregateTable(_Sum_, Table(
_Sum_, Remove('DEP_NAME'n, 'SLA'n), 'Frequency'n))

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 2 replies
  • 882 views
  • 0 likes
  • 2 in conversation