Table of Contents
The SAS software provides users with the ability to display values in a percent format, allowing for a clearer and more concise presentation of data. This feature can be accessed through the use of the FORMAT statement, which allows for the conversion of numerical values into a percent format. By specifying the percent format in the statement, users can easily transform their data into a more easily interpretable form, making it an invaluable tool for data analysis and reporting. Additionally, this feature can be customized to fit the specific needs of the user, providing a flexible and efficient way to display data in percent format.
SAS: Display Values in Percent Format
You can use the PERCENT format option in SAS to print values formatted as percentages.
The following example shows how to use the PERCENT format option in practice.
Example: Display Values in Percent Format in SAS
Suppose we have the following dataset in SAS that shows the exam scores of students in some class:
/*create dataset*/
data my_data;
input student $ exam_score;
datalines;
Andy 0.945
Bob 0.78
Chad 0.865
Derrick 0.77
Eric 0.75
Frank 0.64
George 0.895
Henry 0.98
Isaac 0.68
John 0.84
;
run;
/*view dataset*/
proc printdata=my_data;

Suppose we would like to format the values in the exam_score column using a percent format.
We can use the following syntax to do so:
/*view dataset and display exam scores in percent format*/
proc printdata=my_data;
format exam_score percent10.1;
run;
Each value in the exam_score column is displayed in a percent format.
When using the percent10.1 statement, the 10 specifies that a maximum of 10 characters will be needed to display the entire value including the percent symbol while the 1 specifies that 1 digit should be shown after the decimal place.
If you don’t want to display any values after the decimal place, you can use percent10. instead:
/*view dataset and display exam scores in percent format without decimal places*/
proc printdata=my_data;
format exam_score percent10.;
run;
Notice that each value in the exam_score column is rounded to the nearest integer and each value after the decimal place has been truncated.
Note: You can find the complete documentation for the PERCENT format in SAS .
The following tutorials explain how to perform other common tasks in SAS:
Cite this article
stats writer (2024). How can I display values in percent format using the SAS software?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-display-values-in-percent-format-using-the-sas-software/
stats writer. "How can I display values in percent format using the SAS software?." PSYCHOLOGICAL SCALES, 23 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-i-display-values-in-percent-format-using-the-sas-software/.
stats writer. "How can I display values in percent format using the SAS software?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-display-values-in-percent-format-using-the-sas-software/.
stats writer (2024) 'How can I display values in percent format using the SAS software?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-display-values-in-percent-format-using-the-sas-software/.
[1] stats writer, "How can I display values in percent format using the SAS software?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.
stats writer. How can I display values in percent format using the SAS software?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.
