Hello
I want to use proc report to display data.(No need to calculate because input data is ready to display).
I use proc report in order to merge data that repeat in columns:score Model .(Merging cells)
For this task I use 'group' in define statement.
I see that it is not working well because only in 'score' column it is working but in 'Model' column it is not working
Data tbl;
input Score Model $ Customers Obligation;
cards;
0 A 5269 700
0 B 563 2000
2 A 22712 7000
3 A 21412 4000
4 A 16766 3000
5 A 5634 1500
6 A 3169 800
7 A 2964 900
8 A 3033 800
9 A 1026 200
10 A 635 150
11 A 4522 650
11 B 3 20
12 A 11198 4000
12 B 53 30
;
Run;
proc report data=tbl nowd headskip ;
column Score Model Customers Obligation ;
define Score / group ;
define Model / group ;
run ;
So, you don't get the expected output. But what exactly did you expect?
From the documentation of HEADSKIP:
This option affects only the LISTING output. It has no affect on other ODS output. |
Thanks for you reply.
I expect that in column "Model" cells with same value (for example value "A") will be merges into one cell.
@Ronein wrote:
Thanks for you reply.
I expect that in column "Model" cells with same value (for example value "A") will be merges into one cell.
This won't happen because the values of "Score" change - i know no way to persuade ods to merge the cells, would be useful.
So there is not way to do it??
@Ronein wrote:
So there is not way to do it??
Can you provide what you would expect the output too look like with "merged cells" when there are no duplicates for the combination of score and model?
Perhaps you do not what score in that role. But Proc Report (or tabulate for that matter) aren't likely to have anything to "merge" when the combinations of values to "merge" do not have any duplicates.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.