Date: Fri, 29 Oct 2010 14:29:18 +0000
Reply-To: toby dunn <tobydunn@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: toby dunn <tobydunn@HOTMAIL.COM>
Subject: Re: How can i take columns dynamically
In-Reply-To: <672E1235A3ADD247B9151A53B0C60103BEC950@LTA3VS002.ees.hhs.gov>
Content-Type: text/plain; charset="iso-8859-1"
Ron,
Its more a matter of do you want SAS to have to try to work with a bad data structure
or
have your data structure work with the way SAS functions.
Toby Dunn
"I'm a hell bent 100% Texan til I die"
"Don't touch my Willie, I don't know you that well"
> Date: Fri, 29 Oct 2010 09:46:04 -0400
> From: rjf2@CDC.GOV
> Subject: Re: How can i take columns dynamically
> To: SAS-L@LISTSERV.UGA.EDU
>
> > -----Original Message-----
> > From: toby dunn
> > Sent: Friday, October 29, 2010 9:36 AM
> > Subject: RE: How can i take columns dynamically
> >
> > You would be better served by having your data in a normalized form:
>
> Toby
> Yes, I aggree the solution is getting the correct data structure.
>
> If I read the original Q accurately
> the user has an Accumulating Snapshot type of table
>
> Database Vocabulary:
> Is Your Data Set a Dimension (LookUp) Table,
> a Fact Table or a Report?
>
> http://www.lexjansen.com/wuss/2008/dmw/dmw04.pdf
>
> these tables have entity-id and sets of variables for milestones
> in this case columns named months with facts
> such as amount billed/used during month
>
>
> Ron Fehd the data-structure maven
>
>
> >
> > Date Value
> > 01Apr2010 1
> > 01May2010 2
> > 01Jun2010 3
> >
> >
> > If the Date variable is a SAS Date value, you now have the full
> > functionality of SAS to select the correct months with ease.
> > Then use either Proc Report or Proc Tabulate to create your report.
> >
> > Toby Dunn
> >
> >
> > "I'm a hell bent 100% Texan til I die"
> >
> > "Don't touch my Willie, I don't know you that well"
> >
> >
> >
> >
> > > Date: Fri, 29 Oct 2010 08:21:05 -0500
> > > From: peesari.mahesh@GMAIL.COM
> > > Subject: Re: How can i take columns dynamically
> > > To: SAS-L@LISTSERV.UGA.EDU
> > >
> > > i need to maintain a report contain information of last 6 months,
> > > means i have a report apr, may,,jun, jul ,aug,sep month data, these
> > months
> > > are columns
> > > in next month when i execute report oct month shouls add to report
> > and apr
> > > month should hidden.
> > > i am writing code for report in proc report or datastep report ,
> here
> > i am
> > > defining columns thru hardcode
> > > when i execute report in next month how oct column will pick?
> > >
> > >
> > >
> > > On Fri, Oct 29, 2010 at 8:09 AM, Fehd, Ronald J. (CDC/OCOO/ITSO) <
> > > rjf2@cdc.gov> wrote:
> > >
> > > > > From: Joe H. Smith
> > > > > Sent: Friday, October 29, 2010 5:59 AM
> > > > > Subject: How can i take columns dynamically
> > > > >
> > > > > Hi,
> > > > > I have a report its presenting last 6 months business data for
> > example
> > > > >
> > > > > Apr May Jun Jul Aug Sep
> > > > > 1 2 3 4 5 6
> > > > > 5 3 4 6 2 3
> > > > >
> > > > > In next month when i generate report it should add Oct month and
> > data
> > > > > and
> > > > > hidden Apr month it means the report contains always last
> 6months
> > from
> > > > > execution date, so how can i take data like that dynamically
> > > >
> > > > your task will be simplified by an order of magnitude
> > > > if you name your variables:
> > > >
> > > > attrib
> > > > mon01 length = 4 label = 'Jan'
> > > > mon02 length = 4 label = 'Feb'
> > > > ...
> > > > mon12 length = 4 label = 'Dec'
> > > > ;
> > > >
> > > >
> > > > Ron Fehd the naming-conventions maven
> > > >
> > >
> > >
> > >
> > > --
> > > ******
> > > " The next best thing to winning is losing At least you've been in
> > the
> > > race."
> > >
> > >
> > > ******
> >
|