SAS Office Analytics, SAS Add-In for Microsoft Office, and other integrations

Months in Pivot table - SAS add in

Reply
N/A
Posts: 0

Months in Pivot table - SAS add in

Hi,

I have a sas data set that am trying to open it into a pivot table using sas add in.
The data set that I have has

Month State City crime rate
200901 TX Dallas 57
200812 TX Dallas 55
200812 TX Houston 45
200810 ny Long island 21

When I try to open the above data set like
Table 1
Month 200901 200812
State
TX Dallas 57 55

Table 2

Month 200901 200812
State
TX Houston 57 55

Table 3

Month 200810
State
ny Long island 21


I want to get values 0 and if the data is not present for the month. It should start from the latest month available in teh data set and run to 12 months past that date.

How can I do that?

Any help is much appreciated. My goal is to look for the same months across all the pivot tables and if there is not data then it should write zero in it.

Please help
Super Contributor
Posts: 291

Re: Months in Pivot table - SAS add in

Although your example is not clear to me, maybe I can help.

SAS can't write any data to the pivot table that isn't contained in the data set. If you want to display a zero month in the pivot table, you need to build a zero month in the SAS data set first, e.g. 200902 TX Dallas 0
Ask a Question
Discussion stats
  • 1 reply
  • 156 views
  • 0 likes
  • 2 in conversation