Data visualization with SAS programming

SAS GRAPH

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 125
Accepted Solution

SAS GRAPH

HI ,

I have a dataset like below which has itemid and itemname Diff is Difference

So for id id 123 Amount_1 and Amount_2 are off and for id 456 Amount_1 and Amount_2 are off but for 678 Amount_1,

Amount_2,Amount_3,Amount_4 are off how can we best show in a graph for all the three . Can anyone please help

 

itemid itemname Diff
123 Amount_1 1
123 Amount_2 1
456 Amount_1 1
456 Amount_2 1
456 Amount_3 1
678 Amount_1 1
678 Amount_2 1
678 Amount_3 1
678 Amount_4 1

 

Thank you


Accepted Solutions
Solution
‎10-19-2017 10:51 PM
Esteemed Advisor
Posts: 5,398

Re: SAS GRAPH

Posted in reply to chennupriya

I think a two-way table would do just as well

 

data have;
input itemid itemname $ Diff;
datalines;
123 Amount_1 1 
123 Amount_2 1 
456 Amount_1 1 
456 Amount_2 1 
456 Amount_3 1 
678 Amount_1 1 
678 Amount_2 1 
678 Amount_3 1 
678 Amount_4 1 
;

proc tabulate data=have format=5.0;
class itemid itemname;
var diff;
table itemname, diff*itemid*max="";
run;
PG

View solution in original post


All Replies
Solution
‎10-19-2017 10:51 PM
Esteemed Advisor
Posts: 5,398

Re: SAS GRAPH

Posted in reply to chennupriya

I think a two-way table would do just as well

 

data have;
input itemid itemname $ Diff;
datalines;
123 Amount_1 1 
123 Amount_2 1 
456 Amount_1 1 
456 Amount_2 1 
456 Amount_3 1 
678 Amount_1 1 
678 Amount_2 1 
678 Amount_3 1 
678 Amount_4 1 
;

proc tabulate data=have format=5.0;
class itemid itemname;
var diff;
table itemname, diff*itemid*max="";
run;
PG
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 129 views
  • 2 likes
  • 2 in conversation