BookmarkSubscribeRSS Feed
kancsw
Fluorite | Level 6

Hi All,

I am trying to create a bar chart in SAS visual analytics 7.5 where i am trying to show the distribution of my accounts by a PD bands and customer. I have used the bar chart option in SAS VA and have created a new calculation using the account id count(% of the total). When I am grouping my chart by the customer(used customer as group in roles) it is giving me % by the grand total but i want to see my numbers as % of the column total and not by the Grand total. For demonstration i have pasted the chart that i am getting on SAS VA 7.5. I want my percentages to be shown by each customer as the one in the excel in below picture. can someone help me how do  i change  this from grand total to row total?

 

?distri.PNG

 

distri.PNG

 

7 REPLIES 7
Sam_SAS
SAS Employee

Hello,

 

Instead of using a Percent of Total calculation, try assigning your Count measure to the bar chart and set the Group Scale option on the bar chart to Normalize groups to 100%.

 

I believe this should give you the result you are looking for. Let us know!

 

Thanks,

Sam

kancsw
Fluorite | Level 6

@Sam_SAS - I did change the measure to count and changed the group scale to 100% but it still does not show the right value.distri.png

Sam_SAS
SAS Employee

You want each bar to show the percent of total for only that category value (X or Y)?

 

I think what you might want to do is restructure your data so that X and Y are separate columns (as they appear to be in the Excel table?). Then you can calculate Percent of total for each and assign both measures to the bar chart.

 

Does that make sense? It is possible I am still misunderstanding what you want.

 

Thanks,

Sam

kancsw
Fluorite | Level 6
Sam I think you are misunderstanding my question, I am trying to do a group by customer and do a % of column total like the above excel pivot has done. When I use the % measure as I had shown in my question it is found a %of grand total and not %of column total as you can see in my excel sheet above. I just simply want to change it from being a %of grand total to % of column total
Sam_SAS
SAS Employee

Sorry, I am a little confused by the question and the data. The Excel table makes things confusing because it is different from the table you are visualizing in VA. 

kancsw
Fluorite | Level 6

Hi Sam, if you see the graph attached , this is exactly what I want the VA to do for me, Hopefully this will clear my question. Capture.PNG

Sam_SAS
SAS Employee

Thanks for the new image!

 

I still think that restructuring your data so that the X and Y values of Customer are separate variables would be the best approach. When you assign X and Y (or rather, the Percent of Total calculations for those variables) to the bar chart as separate measures, you should get a bar chart very similar to your screenshot.

 

Sam

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
  • 7 replies
  • 1854 views
  • 0 likes
  • 2 in conversation