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

SAS VA report: average and sum

Regular Contributor
Posts: 247

SAS VA report: average and sum

[ Edited ]

Dataset looks like:
Item Category Stock Stock Capacity (per category)
A Tools 100 120
B Tools 10 120
C Tools 5 120
D Buckets 5 30
E Buckets 10 30

So if i want to get my stock and capaicty per category: i have to take the average to view my stock. (so 115/120 and 15/30) But now i also want my total stock (130/150) I have this info for each month. Is it possible in any way to calculate the total stock in SAS VA? Or do i have to calculate it using DI or EG?

Posts: 322

Re: SAS VA report: average and sum



I'm not completely sure I understand the question. Would it be helpful to create a duplicate measure for Stock? You could create a duplicate measure called "Total Stock" and assign the Sum aggregation.


Also, the Crosstab and List Table report objects have options to display totals for your measures if that helps.


Does that help?




Regular Contributor
Posts: 247

Re: SAS VA report: average and sum

If i create a duplicate measure and choose sum then i will get the correct stock. but not the correct stock capacity.


my warehouse has a stock capacity of 150, 120 for tools, 30 for buckets.

But my stock capacity is listed in each row. So when i take average per category: i get 120 for tools, 30 for buckets, which is correct.

But if i want my total stock capacity (for tools AND buckets) i want to see 150? and not 400 (120+120+120+30+30)


More clear now?

Posts: 322

Re: SAS VA report: average and sum

Oh, I see the problem -- your stock capacity values are repeated for each value within each category.

It might be possible to do this in VA but I don't know how.

Maybe someone else can help?
Ask a Question
Discussion stats
  • 3 replies
  • 2 in conversation