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?
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'.
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.
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.