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

I am creating a report where i am grouping by probability but i dont want the row with probability=0 to be included. How to do that?

proc report data= c1.o;
columns probability____  probability____=opp Total_Media_Value Forecasted_Budget ;
define probability____ / group descending 'Probability';
define Total_Media_Value / SUM 'Total Budget' format= dollar30. ;
define Forecasted_Budget/ computed 'Forecasted Budget'format= dollar30.;
compute Forecasted_Budget;
Forecasted_Budget= (Total_Media_Value.sum)*(probability____);
endcomp;
define opp/n 'Num_of_optys';
rbreak after/ ol summarize style=[backgroundcolor= grrp color=aliceblue ];
title 'London Olympic Pipeline As of 17th November 2012';
run;

 right now i have groups for probability 1, 0.9,0.8,0.7 till 0. But I want groups from 1 till 0.1 , and exclude the group with probability 0

1 ACCEPTED SOLUTION

Accepted Solutions
pau13rown
Lapis Lazuli | Level 10

you could just use a where statement in the proc report line ie:

proc report data= c1.o (where=(probablity ne 0));

 

View solution in original post

3 REPLIES 3
pau13rown
Lapis Lazuli | Level 10

can you show an image of what the table should look like? i think you want something like:

define probability_____ / order order=data noprint;

riya275
Obsidian | Level 7

sorry , i have edited the uestion

pau13rown
Lapis Lazuli | Level 10

you could just use a where statement in the proc report line ie:

proc report data= c1.o (where=(probablity ne 0));

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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