Hi, Basically after running the program the header ends up on a different level compared to the probability level. The tables show up as two seperate tables due to the fact that they are two different datasets. 1; Is there a way to append the two data sets to reveal the results in two tables whilst on the same page. 2; The level of the Headers are all messed up. Would appreciate a simple solution. libname libcw '/folders/myshortcuts/Myfolders'; proc import datafile = '/folders/myshortcuts/Myfolders/OLYMPICS_DIGI.XLS' DBMS= XLS OUT= Libcw.OLYMPICS; GETNAMES = YES; RUN; proc import datafile = '/folders/myshortcuts/Myfolders/OLYMPICS.XLS' DBMS= XLS OUT= libcw.OLYMPICS1; GETNAMES = YES; RUN; DATA Descriptiona ; Set libcw.OLYMPICS1 ; Label Account_Name = Client Name Opportunity_Owner = Sales Person(Champion) Primary_Contact = Primary contact from Client Side Created_Date = Deal creation in CRM Application Probability____ = Probability assigned to different stages of the deal Total_Property_s__Budget_Currenc = Currency Total_Property_s__Budget = As of now money commited for the different slots Comments = Comments Stage = Current Stage of the deal Sports_Elements_seleceted = Ad slot for the sports element Opportunity_Name = CRM Application generated name for the deal Description = Description of the deal Deal_Comments = Comments from the sales person Industry = Client serving industry Last_Modified_Date = Latest of the deal modification in the CRM system Total_Media_Value_Currency = Currency Total_Media_Value = Estimated deal value; Format Total_Media_Value dollar26.; Run; data Useful; Set descriptiona; keep Account_Name Opportunity_Owner Created_Date Probability____ Deal_Comments Total_Media_Value; run; data calculation1; set useful; format Tot_Forecast dollar26.; Tot_Forecast = Total_Media_Value*Probability____/100; run; data calculation2; set calculation1; format Tot_Budget dollar26.; Tot_Budget = sum(Total_Media_Value); run; data Olympicsq; set libcw.olympics; rename _probability___ = Probability____; run; data Useful1; Set Olympicsq; format Total_Media_Value dollar26.; keep Account_Name Opportunity_Owner Created_Date Probability____ Deal_Comments Total_Media_Value; run; data calculation3; set useful1; Format Digital_Bugt dollar26.; Digital_Bugt = Total_Media_Value; run; data calculation4; set calculation3; Format D_forecast dollar26.; D_Forecast = Total_Media_Value*Probability____/100; run; PROC TABULATE DATA=calculation2 style = [color = black borderbottomcolor=black bordercolor=black borderleftcolor=black borderrightcolor=black bordertopcolor=black COLOR = BLACK borderwidth=2] out = Summary1; Title bold italic color = black 'London olympic pipeline as of 17th November 2010'; where Probability____>0; CLASS Probability____ /descending style = [Backgroundcolor = Gray FontWeight = Bold color = black borderbottomcolor=black bordercolor=black borderleftcolor=black borderrightcolor=black bordertopcolor=black COLOR = BLACK borderwidth=2] ; Var Tot_Budget Tot_Forecast/style= [backgroundcolor = gray color = black borderbottomcolor=black bordercolor=black borderleftcolor=black borderrightcolor=black bordertopcolor=black COLOR = BLACK borderwidth=2]; TABLES Probability____ = Probability all='', N = Nbr_of_Optys sum=''*Tot_Budget*f=dollar26. sum=''*Tot_Forecast*f=dollar26. /nocellmerge ; Run; PROC TABULATE DATA=calculation4 out = Summary2; where Probability____>0; CLASS Probability____ /descending ; Var Digital_Bugt D_Forecast ; TABLES Probability____ = Probability all='', N = Nbr_of_Optys sum='' *Digital_Bugt*f=dollar26. sum=''*D_Forecast*f=dollar26. ; Run; Best wishes, Sid
... View more