BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Sathish_jammy
Lapis Lazuli | Level 10

Hi ,

 

Usually I use PROC FREQ to calculate the freq and % of the column.

But in some cases the % value is not accurate like...

While sum up the %column it should be 100, but in some cases it comes like 100.01, 99.99

What are these cases are mean to be in the calculation.

 

proc freq data = Noida;
by q1_gender;
tables q4_tifbox1 q4_tifbox2 q4_tifbox3	q4_tifbox_other /missing;
run;

 SAS Output -

 

gender - M

q4_tifbox_other
q4_tifbox_otherFrequencyPercent
070.13
182414.93
2468984.95

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

This is because the result values are formatted and rounded to 2 decimals.

To change the display formats, see this note: http://support.sas.com/kb/24/822.html

You can also output the results to a dataset and set formats there.

View solution in original post

1 REPLY 1
Kurt_Bremser
Super User

This is because the result values are formatted and rounded to 2 decimals.

To change the display formats, see this note: http://support.sas.com/kb/24/822.html

You can also output the results to a dataset and set formats there.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1188 views
  • 0 likes
  • 2 in conversation