Hello,
SAS VIYA: 3.5
SAS Visual Analytics: 8.5
Having a table with the following structure (table is loaded in CAS) would it be possible to create a bar chart like in the example below without having to create new a new table (in SAS Studio) to summarise the data? I'm wondering if it is possible to manipulate the data only in SAS Visual Analytics.
V1 | V2 | V3 |
0 |
0 | 0 |
1 | 0 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
1 | 1 | 1 |
0 | 1 | 0 |
1 | 1 | 0 |
1 | 1 | 1 |
1 | 0 | |
1 | 0 | |
1 |
Thank you,
smm662002
Hi,
I'm not good enough in VA to tell if this would work or not, but the data presented is not in optimal layout for reporting generally speaking.
Any classifier should be a value in a classifer column, not a variable/column itself.
So I would create a "Vn" column, with values 1, 2 and 3 respectively.
This will give you more flexibility when creating reports, and also being more tolerant for New V's (V4 etc).
Hi,
Thank you for your answer. The data presented in the post is just an extract from a larger table having over 100 columns and a few million records. This data is calculated data rather than raw data. The data can have further transformations, but the question was if the desired chart can be created in SAS Visual Analytics using the data as it is now.
Thank you,
smm662002
It's not a lucky design choice to have the category or group items as variables, in this case v1, v2, v3.
Your table should be transposed as it is in wide format but you need a long format.
data test1;
array x v1 v2 v3;
do i=1 to 50;
do over x;
x=rand("bernoulli", 0.8 + min(0.2, max(-0.8, rand("normal", 0,1))));
end;
output;
end;
run;
proc transpose data= test1 out=test2;
var v:;
by i;
run;
data public.test2(promote=yes);
set test2;
run;
Now I had some time to play around.
And I can't see that this can be done OOTB.
Since your data is already calclated you might be able to adjust that, so it suits general reporting/analysis needs.
As stated intially, and by @acordes, make life easier by transposing your data.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.