BookmarkSubscribeRSS Feed
Yanoothan
Calcite | Level 5

Hi,

I have a column named 'He_abs' with different datasets. I want to calculate the average of all dataset values of the column and then substract the average from all the dataset values in SAS VA.

Therefor I tried to create a calculated item with the expression 'He_abs' - Avg [_ForAll_] ('He_abs').

That does not work and i get the warnings 'element can't be aggregated' and 'operator does not support aggregation'.

 

How can I perform the calculation in SAS VA?

 

Thanks

 

2022-07-23 16_51_43-Greenshot.png

3 REPLIES 3
acordes
Rhodochrosite | Level 12

If you have licenced Visual Statistics then use a GLM to have a dummy model for predicting the mean. 

Probabably you have to create a dummy character variable to use an overall effect. 

Then use the variable of interest as target and the dummy variable as classifiaction effect.

Once the model has finished, derive predicted, that's your grand mean you can use in a calculated item 'x-y'. 

 

Yanoothan
Calcite | Level 5

Hi,

thanks for your answer. But does that mean that the calculation is not possible only using SAS VA?

acordes
Rhodochrosite | Level 12

You can do it in Visual Analytics. 

What I recommend goes for Visual Analytics. 

 

You can achieve this as well by creating an aggregated data source. You first create an aggregated item like mean by total. 

Then aggregate the data source. This way it's easier to deal with it because now the grand total mean becomes a scalar value. 

 

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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