Date: Mon, 12 Feb 2007 09:29:25 +0100
Reply-To: Stéphane COLAS <scolas@DATAMETRIC.FR>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Stéphane COLAS <scolas@DATAMETRIC.FR>
Subject: Re: transpose question
In-Reply-To: <BAY103-F396C143AC7488A3F272195B0910@phx.gbl>
Content-Type: text/plain; charset=ISO-8859-1
Hi David,
In fact I'm building a DataMining DataMarts for BA team where one of the main
table has one line per customer and the informations in columns (as I shown
"customer amt_enc_mt200601 amt_enc_mt200602 amt_mea_mt200601.."). Of course I
have many variables and 24 months of history.
Stephane.
Selon David L Cassell <davidlcassell@MSN.COM>:
> scolas@DATAMETRIC.FR wrote:
> >
> >Hello,
> >
> >if you have
> >
> >customer variable mt200601 mt200602 (more mtYearMonth values in reality)
> >AZERTY Amt_Enc 1234 4567
> >AZERTY Amt_mea 4321 0987
> >(more customers but in the same pattern)
> >
> >OR
> >
> >Customer year_month Amt_enc Amt_mea
> >AZERTY 200601 1234 4321
> >AZERTY 200602 4567 0987
> >...
> >
> >and you want
> >
> >customer amt_enc_mt200601 amt_enc_mt200602 amt_mea_mt200601
> >amt_mea_mt200602
> >AZERTY 1234 4567 4321 0987
> >
> >ie. on line by customer.
> >
> >It's sound like a transpose statement no ?
> >
> >I'm looking for a single step method (like a proc tranpose) to do that but
> >I
> >didn't find.
> >
> >Any suggestion ?
> >
> >
> >TIA.
> >
> >Stéphane.
>
> Hi, Stéphane. I have a question for you.
>
> Everyone is building you data sets. But your question sounds like
> you want to do some transposing for reporting purposes or for
> display. What do you want this for?
>
> I ask, because your goal may change things. It might be that
> you would be better off using a tool like PROC REPORT or
> PROC TABULATE, if your goal is producing a report when
> your data have these shapes.
>
> Of course, my bottom line on this is going to be that putting the
> data into a normalized form to start with will make all of your future
> work easier. But that doesn't address your immediate question.
>
> HTH,
> David
> --
> David L. Cassell
> mathematical statistician
> Design Pathways
> 3115 NW Norwood Pl.
> Corvallis OR 97330
>
> _________________________________________________________________
> Valentine’s Day -- Shop for gifts that spell L-O-V-E at MSN Shopping
>
http://shopping.msn.com/content/shp/?ctId=8323,ptnrid=37,ptnrdata=24095&tcode=wlmtagline
>
|