How to get the result table1 be like table2 in sas eg
table1:
table3:
It's really hard to understand how your data is actually structured from this. Please provide data in a clear, usable form (preferably in the form of a data step)
WHAT I MEAN IS:
from this table in result sas EG
state and administrative district | |
Johor |
|
| Batu pahat |
| Muar |
to get like this table result sas EG
state and administrative district |
Johor |
Batu pahat |
Muar |
that is different variable name. state: johor and administrative district: batu pahat and muar.
Please post example data if you would like assistance with the code.
Your images show the variables being in the same column.
Here are instructions on how to provide sample data as a data step:
https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat...
@merahilyana wrote:
WHAT I MEAN IS:
from this table in result sas EG
state and
administrative district
Johor
Batu pahat
Muar
to get like this table result sas EG
state and
administrative district
Johor
Batu pahat
Muar
that is different variable name. state: johor and administrative district: batu pahat and muar.
Do you mean the appearance inside a data set with viewtable or similar tool? Or a report table generated for people to read by a report procedure such as Proc Report, Tabulate or something else?
One approach may be multilabel formats for a report such as shown in the attachment examples.
PROC REPORT with journal style will give you that report.
@merahilyana wrote:
How to get the result table1 be like table2 in sas eg
table1:
table3:
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.