在Base SAS中运行Proc Report后,在计算变量的RBreak之后不会生成汇总值

时间:2015-11-22 10:51:49

标签: sas

我想通过Proc Report创建一个摘要报告,该报告应该包含以下列

Probability, Nbr_of_Optys, Total_Media_Value & Tot_Forecast which is computed by the product of probability & Total_Media_Value.

我写了这段代码:

 proc report data = Cs1.olympics headline;                                                                                            
   column Probability Stage (n) Total_Media_Value Tot_Forecast;                                                                         
   where Probability > 0;                                                                                                               
   define Probability/group Descending 'Probability';                                                                                   
   define Stage/group noprint;                                                                                                          
   define n / format = comma6. 'Nbr_of_Optys';                                                                                          
   define Total_Media_Value/analysis format = dollar25. 'Tot_Budget';                                                                   
   define Tot_Forecast/computed format = dollar25.;                                                                                     
   compute Tot_Forecast;                                                                                                                
   Tot_Forecast = (Total_Media_Value.sum*Probability)/100;                                                                              
   endcomp;                                                                                                                             

   rbreak after / summarize ol ul skip;                                                                                                 

   run;                                                                                                                                 

运行报告后,将显示一条消息,在执行此报告后的操作

后生成缺失值
Probability Nbr_of_Optys Tot_Budget     Tot_Forecast
100           7          $171,675,000   $171,675,000
90            4          $205,000,000   $184,500,000
70            8          $264,000,000   $184,800,000
50            20         $127,040,000   $63,520,000
30            3          $2,450,000     $735,000
10            319        $333,729,670   $333,372,967
              361        $1,103,894,670 

我没有获得Tot_Forecast的总结值

0 个答案:

没有答案