08-02-2016 07:37 AM - last edited on 08-02-2016 07:48 AM by KurtBremser
i am not getting the last column , the tot_forecast
proc report data = Olympics2 headline; column _probability___ (n) Total_Media_Value Tot_Forecast ; where _probability___ > 0; define _probability___/group Descending 'Probability'; 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;
there is an error: Missing values are generated as a result of performing an operation on a each place
08-02-2016 07:51 AM
I edited the post for you, so that the code is easier to read. PLEASE use the "little running man" icon to open the subwindow for SAS code.
Please also post the complete log of the proc report step, so one can see where the missings have effect.
08-02-2016 10:43 AM
This may also be data related. Without data it is very hard to test code.
This link shows how to create data step code that you can post as text or attach as a text file so that we can recreate data: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... to use with your code.
08-03-2016 12:17 AM
You can make a condition before computing it. if not missing(Total_Media_Value.sum) and not missing(_probability___) then Tot_Forecast = (Total_Media_Value.sum*_probability___)/100;