BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
kritima
Obsidian | Level 7

Dear all,

 

I have a question .

I have one dataset with numeric format. I use transpose and the format have not same as original.

 

Any suggestion?


data input;
set data_plot;
     format all_cid pass fail comma22.0 fail_rate goal comma22.2;


label fail_rate = Fail Rate(%);
label all_cid = Total;
label pass = Pass;
label fail = Fail;
label goal = goal;


run;

 

 

proc transpose data=input out=output (drop = _NAME_);
id xaxis ;
var all_cid pass fail fail_rate goal;
run;

 

i attach my input file and output file which i want to see

 

this is the current result which is wrong

ScreenHunter_84 Sep. 09 19.58.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User
Or you could use PROC REPORT + CALL DEFINE()

View solution in original post

3 REPLIES 3
Reeza
Super User

A column in SAS can only have one format, numeric or percent. 

You can convert the values or character using a PUT statement and apply the format of choice. 

Reeza
Super User

A column in SAS can only have one format, numeric or percent. 

You can convert the values or character using a PUT statement and apply the format of choice. 

Ksharp
Super User
Or you could use PROC REPORT + CALL DEFINE()

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 5018 views
  • 2 likes
  • 3 in conversation