Write and run SAS programs in your web browser

Pivot data on export

Reply
Contributor
Posts: 57

Pivot data on export

Hi

 

I want to piviot the below data in excel on export.

Any ideas?

I know how to use proc export etc to do a data cump in excel but how would I pivot the data?

 

 

Col AAgeQtrGenderTypeAmt
E143Quarter 3 FIP2
E145Quarter 3 MIP1
E146Quarter 3 FDC10
E147Quarter 4FIP1
E148Quarter 4MDC1
E153Quarter 3 FIP2
E155Quarter 3 MIP1
E156Quarter 3 FDC10
E157Quarter 4FIP1
E158Quarter 4MDC1

Expected Output

 

 

Sum of Amt QtrGenderType         
  Quarter 3     Quarter 3  TotalQuarter 4   Quarter 4 TotalGrand Total
  F F TotalMM Total FF TotalMM Total  
Col AAgeDCIP IP  IP DC   
E143 22  2     2
 5   111     1
 610 10  10     10
 7      11  11
 8        1111
E153 22  2     2
 5   111     1
 610 10  10     10
 7      11  11
 8        1111
Grand Total 2042422262222430
Grand Advisor
Posts: 16,385

Re: Pivot data on export

ODS EXCEL + PROC TABULATE 

Post a Question
Discussion Stats
  • 1 reply
  • 53 views
  • 0 likes
  • 2 in conversation