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

I have a problem with quite a simple proc step.

proc tabulate data=some_data;

class time;

var boolean1;

table time, n boolean

TimeNumber of obs in a given time (n)sum of boolean variableWhat i want
110010(10/100)*100%
220050(50/200)*100%
330060(60/300)*100%
440080(80/400)*100%
........

But actually, I want to get the percent of the sum of boolean variable over a number of observations in a given period.

I tried boolean*rowpctn, different denominators for pctn<>, but none of this worked.

Could you please help me?

1 ACCEPTED SOLUTION

Accepted Solutions
TomKari
Onyx | Level 15

To me, it looks like you're asking for

TABLE time, boolean1 * (N Sum Mean);

Tom

View solution in original post

2 REPLIES 2
TomKari
Onyx | Level 15

To me, it looks like you're asking for

TABLE time, boolean1 * (N Sum Mean);

Tom

neq1337
Calcite | Level 5

Thanks. I tried this before, but somehow I didn't notice that I have to apply "percent" format and I thought the figures are wrong Smiley Wink.

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

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 2 replies
  • 1261 views
  • 0 likes
  • 2 in conversation