merge two cell using PROC TABULATE

Reply
Contributor
Posts: 27

merge two cell using PROC TABULATE

I am using PROC TABULATE for generating summary report. But problem is that I am getting report like 'figure A' but I am want to report like 'figure B' instead of 'figure A'. Refer the below image:



problem.png

Attachment
Grand Advisor
Posts: 10,210

Re: merge two cell using PROC TABULATE

You should post some dummy data with the same structure as used to create table A.

Contributor
Posts: 27

Re: merge two cell using PROC TABULATE

Dear Ballardw,

Thank you for taking the time and interest. As per your request I am enclosing dummy SAS dataset.

Attachment
Contributor
Posts: 37

Re: merge two cell using PROC TABULATE

Hi

Question... Do you really want to have two columns as "Achievement during April to June" why not group the two into one? I guess , the blank cell is due to the fact that you defined Achievement1 twice in your table statement. I would make it as a single column instead , like

PROC TABULATE DATA=temp.APPEND_TABLE1;

  VAR NeedAssessed ANCCurr ANCPrev ANCChange PercenAchievment Women3checups Total_WOMEN_3CHECKUP_16;

  CLASS StateCategory_V / ORDER=UNFORMATTED MISSING;

  CLASS StateName_V / ORDER=UNFORMATTED MISSING;

  CLASS Achievement1 / ORDER=UNFORMATTED MISSING;

  CLASS TotalANCRegistered / ORDER=UNFORMATTED MISSING;

  TABLE

  StateCategory_V * StateName_V,

  NeedAssessed*Sum

  Achievement1={LABEL=''}*

  (

  TotalANCRegistered={LABEL=''}*

  (

    ANCCurr*Sum

     ANCPrev*Sum

  )

  ANCChange*Sum

  Total_WOMEN_3CHECKUP_16*Sum

  Women3checups*Sum

  )

  PercenAchievment*Sum

  ;

RUN;

The output table will have the below structure

Capture.PNG

Thanks

Contributor
Posts: 27

Re: merge two cell using PROC TABULATE

Hi Karthikeyan,

Thank you so much for your response and suggestion. But my need is same structure.

Contributor
Posts: 27

Re: merge two cell using PROC TABULATE

Hello Cynthia,

I hope you must have a solution to my problem, really I am struggling with this report for last few days.

I hope for your best response!

Ask a Question
Discussion stats
  • 5 replies
  • 410 views
  • 0 likes
  • 3 in conversation