|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Problems using LinRegR2Hi All,
I'm currently trying to use LinRegSlope as follows: LinRegR2(lastperiods(60), [Measures].[Growth_Avg], ?????) I would like to regress the growth_avg measure against the following series (1,2,3,...,60). So, essentially I'm regressing against a time series from 1 to 60. I cannot seem to figure out how to fill in the question marks with a set of numbers going from 1 to 60. Any help would be appreciated. I'm a little confused about your request.
It would help us better assist you if you could include table DDL, query strategy used so far, sample data in the form of INSERT statements, and an illustration of the desired results. (For help with that refer to: http://www.aspfaq.com/5006 ) The less 'set up' work we have to do, the more likely you are going to have folks tackle your problem and help you. Without this effort from you, we are just playing guessing games. Is it that you want to execute LinRegR2 in a loop, 60 times, each time with an increasing value in the last position? Or do you want to replace the question marks with a comma delimited series of numbers, i.e., 1,2,3,4,5...? Perhaps something like this: DECLARE Counter int SET Counter = 1 WHILE Counter <= 60 BEGIN EXECUTE LinRegR2(lastperiods(60), [Measures].[Growth_Avg], Counter) SET Counter = ( Counter + 1 ) END -- Show quoteArnie Rowland, Ph.D. Westwood Consulting, Inc Most good judgment comes from experience. Most experience comes from bad judgment. - Anonymous "Ash" <ashv***@gmail.com> wrote in message news:1155842409.256941.221370@h48g2000cwc.googlegroups.com... > Hi All, > > I'm currently trying to use LinRegSlope as follows: > > LinRegR2(lastperiods(60), [Measures].[Growth_Avg], ?????) > > I would like to regress the growth_avg measure against the following > series (1,2,3,...,60). So, essentially I'm regressing against a time > series from 1 to 60. I cannot seem to figure out how to fill in the > question marks with a set of numbers going from 1 to 60. > > Any help would be appreciated. > Hi Arnie,
Thanks for your response. Yes, I would like to replace the question marks with a comma delimited series of numbers(1,2,3,...,60). Is it as simple as that? Can I simply enter in manually the series from 1 to 60? Thanks Arnie Rowland wrote: Show quote > I'm a little confused about your request. > > It would help us better assist you if you could include table DDL, query strategy used so far, sample data in the form of INSERT statements, and an illustration of the desired results. (For help with that refer to: http://www.aspfaq.com/5006 ) > > > > The less 'set up' work we have to do, the more likely you are going to have folks tackle your problem and help you. Without this effort from you, we are just playing guessing games. > > > Is it that you want to execute LinRegR2 in a loop, 60 times, each time with an increasing value in the last position? Or do you want to replace the question marks with a comma delimited series of numbers, i.e., 1,2,3,4,5...? > > Perhaps something like this: > > DECLARE Counter int > SET Counter = 1 > > WHILE Counter <= 60 > BEGIN > EXECUTE LinRegR2(lastperiods(60), [Measures].[Growth_Avg], Counter) > SET Counter = ( Counter + 1 ) > END > > -- > Arnie Rowland, Ph.D. > Westwood Consulting, Inc > > Most good judgment comes from experience. > Most experience comes from bad judgment. > - Anonymous > > > "Ash" <ashv***@gmail.com> wrote in message news:1155842409.256941.221370@h48g2000cwc.googlegroups.com... > > Hi All, > > > > I'm currently trying to use LinRegSlope as follows: > > > > LinRegR2(lastperiods(60), [Measures].[Growth_Avg], ?????) > > > > I would like to regress the growth_avg measure against the following > > series (1,2,3,...,60). So, essentially I'm regressing against a time > > series from 1 to 60. I cannot seem to figure out how to fill in the > > question marks with a set of numbers going from 1 to 60. > > > > Any help would be appreciated. > > > ------=_NextPart_000_0AE6_01C6C211.8268B2D0 > Content-Type: text/html; charset=iso-8859-1 > Content-Transfer-Encoding: quoted-printable > X-Google-AttachSize: 4199 > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> > <HTML><HEAD> > <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> > <META content="MSHTML 6.00.5296.0" name=GENERATOR> > <STYLE></STYLE> > </HEAD> > <BODY> > <DIV><FONT face=Arial size=2>I'm a little confused about your > request.</FONT></DIV> > <DIV><FONT face=Arial size=2></FONT> </DIV> > <DIV> > <P class=MsoNormal > style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN > style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-no-proof: yes">It > would help us better assist you if you could include table DDL, query strategy > used so far, sample data in the form of INSERT statements, and an illustration > of the desired results. (For help with that refer to: http://www.aspfaq.com/5006 > ) <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" > /><o:p></o:p></SPAN></P> > <P class=MsoNormal > style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN > style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-no-proof: yes"><o:p> </o:p></SPAN></P> > <P class=MsoNormal > style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN > style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-no-proof: yes">The > less 'set up' work we have to do, the more likely you are going to have folks > tackle your problem and help you. Without this effort from you, we are just > playing guessing games. <o:p></o:p></SPAN></P></DIV> > <DIV><FONT face=Arial size=2></FONT> </DIV> > <DIV><FONT face=Arial size=2>Is it that you want to execute LinRegR2 in a loop, > 60 times, each time with an increasing value in the last position? Or do you > want to replace the question marks with a comma delimited series of numbers, > i.e., 1,2,3,4,5...?</FONT></DIV> > <DIV><FONT face=Arial size=2></FONT> </DIV> > <DIV><FONT face=Arial size=2>Perhaps something like this:</FONT></DIV> > <DIV><FONT face=Arial size=2></FONT> </DIV> > <DIV><FONT face="Courier New" size=2>DECLARE Counter int</FONT></DIV> > <DIV><FONT face="Courier New" size=2>SET Counter = 1</FONT></DIV> > <DIV><FONT face="Courier New" size=2></FONT> </DIV> > <DIV><FONT face="Courier New" size=2>WHILE Counter <= 60</FONT></DIV> > <DIV><FONT face="Courier New" size=2> BEGIN</FONT></DIV> > <DIV><FONT face="Courier New" size=2> EXECUTE > LinRegR2(lastperiods(60), [Measures].[Growth_Avg], > Counter)<BR> SET Counter = ( Counter + 1 > )</FONT></DIV> > <DIV><FONT face="Courier New" size=2> END</FONT></DIV> > <DIV><BR><FONT face=Arial size=2>-- <BR>Arnie Rowland, Ph.D.<BR>Westwood > Consulting, Inc</FONT></DIV> > <DIV><FONT face=Arial size=2></FONT> </DIV> > <DIV><FONT face=Arial size=2>Most good judgment comes from experience. <BR>Most > experience comes from bad judgment. <BR>- Anonymous</FONT></DIV> > <DIV><FONT face=Arial size=2></FONT> </DIV> > <DIV><FONT face=Arial size=2></FONT> </DIV> > <DIV><FONT face=Arial size=2>"Ash" <</FONT><A > href="mailto:ashv***@gmail.com"><FONT face=Arial > size=2>ashv***@gmail.com</FONT></A><FONT face=Arial size=2>> wrote in message > </FONT><A > href="news:1155842409.256941.221***@h48g2000cwc.googlegroups.com"><FONT > face=Arial > size=2>news:1155842409.256941.221370@h48g2000cwc.googlegroups.com</FONT></A><FONT > face=Arial size=2>...</FONT></DIV><FONT face=Arial size=2>> Hi All,<BR>> > <BR>> I'm currently trying to use LinRegSlope as follows:<BR>> <BR>> > LinRegR2(lastperiods(60), [Measures].[Growth_Avg], ?????)<BR>> <BR>> I > would like to regress the growth_avg measure against the following<BR>> > series (1,2,3,...,60). So, essentially I'm regressing against a > time<BR>> series from 1 to 60. I cannot seem to figure out how to fill > in the<BR>> question marks with a set of numbers going from 1 to 60.<BR>> > <BR>> Any help would be appreciated.<BR>></FONT></BODY></HTML> > > ------=_NextPart_000_0AE6_01C6C211.8268B2D0-- Unfortunately, it's not quite that simple.
Can you provide the code for LinRegR2()? I suspect that it may be possible to pass a parameter indicating 'number of periods', and the 'looping' can occur in the procedure/function. -- Show quoteArnie Rowland, Ph.D. Westwood Consulting, Inc Most good judgment comes from experience. Most experience comes from bad judgment. - Anonymous "Ash" <ashv***@gmail.com> wrote in message news:1155905892.104941.276690@74g2000cwt.googlegroups.com... > Hi Arnie, > > Thanks for your response. > > Yes, I would like to replace the question marks with a comma delimited > series of numbers(1,2,3,...,60). Is it as simple as that? Can I > simply enter in manually the series from 1 to 60? > > Thanks > > > > Arnie Rowland wrote: >> I'm a little confused about your request. >> >> It would help us better assist you if you could include table DDL, query >> strategy used so far, sample data in the form of INSERT statements, and >> an illustration of the desired results. (For help with that refer to: >> http://www.aspfaq.com/5006 ) >> >> >> >> The less 'set up' work we have to do, the more likely you are going to >> have folks tackle your problem and help you. Without this effort from >> you, we are just playing guessing games. >> >> >> Is it that you want to execute LinRegR2 in a loop, 60 times, each time >> with an increasing value in the last position? Or do you want to replace >> the question marks with a comma delimited series of numbers, i.e., >> 1,2,3,4,5...? >> >> Perhaps something like this: >> >> DECLARE Counter int >> SET Counter = 1 >> >> WHILE Counter <= 60 >> BEGIN >> EXECUTE LinRegR2(lastperiods(60), [Measures].[Growth_Avg], Counter) >> SET Counter = ( Counter + 1 ) >> END >> >> -- >> Arnie Rowland, Ph.D. >> Westwood Consulting, Inc >> >> Most good judgment comes from experience. >> Most experience comes from bad judgment. >> - Anonymous >> >> >> "Ash" <ashv***@gmail.com> wrote in message >> news:1155842409.256941.221370@h48g2000cwc.googlegroups.com... >> > Hi All, >> > >> > I'm currently trying to use LinRegSlope as follows: >> > >> > LinRegR2(lastperiods(60), [Measures].[Growth_Avg], ?????) >> > >> > I would like to regress the growth_avg measure against the following >> > series (1,2,3,...,60). So, essentially I'm regressing against a time >> > series from 1 to 60. I cannot seem to figure out how to fill in the >> > question marks with a set of numbers going from 1 to 60. >> > >> > Any help would be appreciated. >> > >> ------=_NextPart_000_0AE6_01C6C211.8268B2D0 >> Content-Type: text/html; charset=iso-8859-1 >> Content-Transfer-Encoding: quoted-printable >> X-Google-AttachSize: 4199 >> >> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> >> <HTML><HEAD> >> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> >> <META content="MSHTML 6.00.5296.0" name=GENERATOR> >> <STYLE></STYLE> >> </HEAD> >> <BODY> >> <DIV><FONT face=Arial size=2>I'm a little confused about your >> request.</FONT></DIV> >> <DIV><FONT face=Arial size=2></FONT> </DIV> >> <DIV> >> <P class=MsoNormal >> style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN >> style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-no-proof: >> yes">It >> would help us better assist you if you could include table DDL, query >> strategy >> used so far, sample data in the form of INSERT statements, and an >> illustration >> of the desired results. (For help with that refer to: >> http://www.aspfaq.com/5006 >> ) <?xml:namespace prefix = o ns = >> "urn:schemas-microsoft-com:office:office" >> /><o:p></o:p></SPAN></P> >> <P class=MsoNormal >> style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN >> style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-no-proof: >> yes"><o:p> </o:p></SPAN></P> >> <P class=MsoNormal >> style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN >> style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-no-proof: >> yes">The >> less 'set up' work we have to do, the more likely you are going to have >> folks >> tackle your problem and help you. Without this effort from you, we are >> just >> playing guessing games. <o:p></o:p></SPAN></P></DIV> >> <DIV><FONT face=Arial size=2></FONT> </DIV> >> <DIV><FONT face=Arial size=2>Is it that you want to execute LinRegR2 in a >> loop, >> 60 times, each time with an increasing value in the last position? Or do >> you >> want to replace the question marks with a comma delimited series of >> numbers, >> i.e., 1,2,3,4,5...?</FONT></DIV> >> <DIV><FONT face=Arial size=2></FONT> </DIV> >> <DIV><FONT face=Arial size=2>Perhaps something like >> this:</FONT></DIV> >> <DIV><FONT face=Arial size=2></FONT> </DIV> >> <DIV><FONT face="Courier New" size=2>DECLARE Counter int</FONT></DIV> >> <DIV><FONT face="Courier New" size=2>SET Counter = 1</FONT></DIV> >> <DIV><FONT face="Courier New" size=2></FONT> </DIV> >> <DIV><FONT face="Courier New" size=2>WHILE Counter <= 60</FONT></DIV> >> <DIV><FONT face="Courier New" size=2> BEGIN</FONT></DIV> >> <DIV><FONT face="Courier New" size=2> >> EXECUTE >> LinRegR2(lastperiods(60), [Measures].[Growth_Avg], >> Counter)<BR> SET Counter = ( Counter + 1 >> )</FONT></DIV> >> <DIV><FONT face="Courier New" size=2> END</FONT></DIV> >> <DIV><BR><FONT face=Arial size=2>-- <BR>Arnie Rowland, Ph.D.<BR>Westwood >> Consulting, Inc</FONT></DIV> >> <DIV><FONT face=Arial size=2></FONT> </DIV> >> <DIV><FONT face=Arial size=2>Most good judgment comes from experience. >> <BR>Most >> experience comes from bad judgment. <BR>- Anonymous</FONT></DIV> >> <DIV><FONT face=Arial size=2></FONT> </DIV> >> <DIV><FONT face=Arial size=2></FONT> </DIV> >> <DIV><FONT face=Arial size=2>"Ash" <</FONT><A >> href="mailto:ashv***@gmail.com"><FONT face=Arial >> size=2>ashv***@gmail.com</FONT></A><FONT face=Arial size=2>> wrote in >> message >> </FONT><A >> href="news:1155842409.256941.221***@h48g2000cwc.googlegroups.com"><FONT >> face=Arial >> size=2>news:1155842409.256941.221370@h48g2000cwc.googlegroups.com</FONT></A><FONT >> face=Arial size=2>...</FONT></DIV><FONT face=Arial size=2>> Hi >> All,<BR>> >> <BR>> I'm currently trying to use LinRegSlope as follows:<BR>> >> <BR>> >> LinRegR2(lastperiods(60), [Measures].[Growth_Avg], ?????)<BR>> >> <BR>> I >> would like to regress the growth_avg measure against the >> following<BR>> >> series (1,2,3,...,60). So, essentially I'm regressing against a >> time<BR>> series from 1 to 60. I cannot seem to figure out how >> to fill >> in the<BR>> question marks with a set of numbers going from 1 to >> 60.<BR>> >> <BR>> Any help would be appreciated.<BR>></FONT></BODY></HTML> >> >> ------=_NextPart_000_0AE6_01C6C211.8268B2D0-- > Since LinRegR2 is an Analysis Services function, you probably should try
posting this question in microsoft.public.sqlserver.olap. Tom Show quote "Ash" <ashv***@gmail.com> wrote in message news:1155905892.104941.276690@74g2000cwt.googlegroups.com... > Hi Arnie, > > Thanks for your response. > > Yes, I would like to replace the question marks with a comma delimited > series of numbers(1,2,3,...,60). Is it as simple as that? Can I > simply enter in manually the series from 1 to 60? > > Thanks > > > > Arnie Rowland wrote: >> I'm a little confused about your request. >> >> It would help us better assist you if you could include table DDL, query >> strategy used so far, sample data in the form of INSERT statements, and >> an illustration of the desired results. (For help with that refer to: >> http://www.aspfaq.com/5006 ) >> >> >> >> The less 'set up' work we have to do, the more likely you are going to >> have folks tackle your problem and help you. Without this effort from >> you, we are just playing guessing games. >> >> >> Is it that you want to execute LinRegR2 in a loop, 60 times, each time >> with an increasing value in the last position? Or do you want to replace >> the question marks with a comma delimited series of numbers, i.e., >> 1,2,3,4,5...? >> >> Perhaps something like this: >> >> DECLARE Counter int >> SET Counter = 1 >> >> WHILE Counter <= 60 >> BEGIN >> EXECUTE LinRegR2(lastperiods(60), [Measures].[Growth_Avg], Counter) >> SET Counter = ( Counter + 1 ) >> END >> >> -- >> Arnie Rowland, Ph.D. >> Westwood Consulting, Inc >> >> Most good judgment comes from experience. >> Most experience comes from bad judgment. >> - Anonymous >> >> >> "Ash" <ashv***@gmail.com> wrote in message >> news:1155842409.256941.221370@h48g2000cwc.googlegroups.com... >> > Hi All, >> > >> > I'm currently trying to use LinRegSlope as follows: >> > >> > LinRegR2(lastperiods(60), [Measures].[Growth_Avg], ?????) >> > >> > I would like to regress the growth_avg measure against the following >> > series (1,2,3,...,60). So, essentially I'm regressing against a time >> > series from 1 to 60. I cannot seem to figure out how to fill in the >> > question marks with a set of numbers going from 1 to 60. >> > >> > Any help would be appreciated. >> > >> ------=_NextPart_000_0AE6_01C6C211.8268B2D0 >> Content-Type: text/html; charset=iso-8859-1 >> Content-Transfer-Encoding: quoted-printable >> X-Google-AttachSize: 4199 >> >> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> >> <HTML><HEAD> >> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> >> <META content="MSHTML 6.00.5296.0" name=GENERATOR> >> <STYLE></STYLE> >> </HEAD> >> <BODY> >> <DIV><FONT face=Arial size=2>I'm a little confused about your >> request.</FONT></DIV> >> <DIV><FONT face=Arial size=2></FONT> </DIV> >> <DIV> >> <P class=MsoNormal >> style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN >> style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-no-proof: >> yes">It >> would help us better assist you if you could include table DDL, query >> strategy >> used so far, sample data in the form of INSERT statements, and an >> illustration >> of the desired results. (For help with that refer to: >> http://www.aspfaq.com/5006 >> ) <?xml:namespace prefix = o ns = >> "urn:schemas-microsoft-com:office:office" >> /><o:p></o:p></SPAN></P> >> <P class=MsoNormal >> style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN >> style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-no-proof: >> yes"><o:p> </o:p></SPAN></P> >> <P class=MsoNormal >> style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN >> style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-no-proof: >> yes">The >> less 'set up' work we have to do, the more likely you are going to have >> folks >> tackle your problem and help you. Without this effort from you, we are >> just >> playing guessing games. <o:p></o:p></SPAN></P></DIV> >> <DIV><FONT face=Arial size=2></FONT> </DIV> >> <DIV><FONT face=Arial size=2>Is it that you want to execute LinRegR2 in a >> loop, >> 60 times, each time with an increasing value in the last position? Or do >> you >> want to replace the question marks with a comma delimited series of >> numbers, >> i.e., 1,2,3,4,5...?</FONT></DIV> >> <DIV><FONT face=Arial size=2></FONT> </DIV> >> <DIV><FONT face=Arial size=2>Perhaps something like >> this:</FONT></DIV> >> <DIV><FONT face=Arial size=2></FONT> </DIV> >> <DIV><FONT face="Courier New" size=2>DECLARE Counter int</FONT></DIV> >> <DIV><FONT face="Courier New" size=2>SET Counter = 1</FONT></DIV> >> <DIV><FONT face="Courier New" size=2></FONT> </DIV> >> <DIV><FONT face="Courier New" size=2>WHILE Counter <= 60</FONT></DIV> >> <DIV><FONT face="Courier New" size=2> BEGIN</FONT></DIV> >> <DIV><FONT face="Courier New" size=2> >> EXECUTE >> LinRegR2(lastperiods(60), [Measures].[Growth_Avg], >> Counter)<BR> SET Counter = ( Counter + 1 >> )</FONT></DIV> >> <DIV><FONT face="Courier New" size=2> END</FONT></DIV> >> <DIV><BR><FONT face=Arial size=2>-- <BR>Arnie Rowland, Ph.D.<BR>Westwood >> Consulting, Inc</FONT></DIV> >> <DIV><FONT face=Arial size=2></FONT> </DIV> >> <DIV><FONT face=Arial size=2>Most good judgment comes from experience. >> <BR>Most >> experience comes from bad judgment. <BR>- Anonymous</FONT></DIV> >> <DIV><FONT face=Arial size=2></FONT> </DIV> >> <DIV><FONT face=Arial size=2></FONT> </DIV> >> <DIV><FONT face=Arial size=2>"Ash" <</FONT><A >> href="mailto:ashv***@gmail.com"><FONT face=Arial >> size=2>ashv***@gmail.com</FONT></A><FONT face=Arial size=2>> wrote in >> message >> </FONT><A >> href="news:1155842409.256941.221***@h48g2000cwc.googlegroups.com"><FONT >> face=Arial >> size=2>news:1155842409.256941.221370@h48g2000cwc.googlegroups.com</FONT></A><FONT >> face=Arial size=2>...</FONT></DIV><FONT face=Arial size=2>> Hi >> All,<BR>> >> <BR>> I'm currently trying to use LinRegSlope as follows:<BR>> >> <BR>> >> LinRegR2(lastperiods(60), [Measures].[Growth_Avg], ?????)<BR>> >> <BR>> I >> would like to regress the growth_avg measure against the >> following<BR>> >> series (1,2,3,...,60). So, essentially I'm regressing against a >> time<BR>> series from 1 to 60. I cannot seem to figure out how >> to fill >> in the<BR>> question marks with a set of numbers going from 1 to >> 60.<BR>> >> <BR>> Any help would be appreciated.<BR>></FONT></BODY></HTML> >> >> ------=_NextPart_000_0AE6_01C6C211.8268B2D0-- > Duh...
-- Show quoteArnie Rowland, Ph.D. Westwood Consulting, Inc Most good judgment comes from experience. Most experience comes from bad judgment. - Anonymous "Tom Cooper" <tom.no.spam.please.cooper@comcast.net> wrote in message news:NPSdnbPY7_ZyaHjZnZ2dnUVZ_vWdnZ2d@comcast.com... > Since LinRegR2 is an Analysis Services function, you probably should try > posting this question in microsoft.public.sqlserver.olap. > > Tom > > "Ash" <ashv***@gmail.com> wrote in message > news:1155905892.104941.276690@74g2000cwt.googlegroups.com... >> Hi Arnie, >> >> Thanks for your response. >> >> Yes, I would like to replace the question marks with a comma delimited >> series of numbers(1,2,3,...,60). Is it as simple as that? Can I >> simply enter in manually the series from 1 to 60? >> >> Thanks >> >> >> >> Arnie Rowland wrote: >>> I'm a little confused about your request. >>> >>> It would help us better assist you if you could include table DDL, query >>> strategy used so far, sample data in the form of INSERT statements, and >>> an illustration of the desired results. (For help with that refer to: >>> http://www.aspfaq.com/5006 ) >>> >>> >>> >>> The less 'set up' work we have to do, the more likely you are going to >>> have folks tackle your problem and help you. Without this effort from >>> you, we are just playing guessing games. >>> >>> >>> Is it that you want to execute LinRegR2 in a loop, 60 times, each time >>> with an increasing value in the last position? Or do you want to replace >>> the question marks with a comma delimited series of numbers, i.e., >>> 1,2,3,4,5...? >>> >>> Perhaps something like this: >>> >>> DECLARE Counter int >>> SET Counter = 1 >>> >>> WHILE Counter <= 60 >>> BEGIN >>> EXECUTE LinRegR2(lastperiods(60), [Measures].[Growth_Avg], >>> Counter) >>> SET Counter = ( Counter + 1 ) >>> END >>> >>> -- >>> Arnie Rowland, Ph.D. >>> Westwood Consulting, Inc >>> >>> Most good judgment comes from experience. >>> Most experience comes from bad judgment. >>> - Anonymous >>> >>> >>> "Ash" <ashv***@gmail.com> wrote in message >>> news:1155842409.256941.221370@h48g2000cwc.googlegroups.com... >>> > Hi All, >>> > >>> > I'm currently trying to use LinRegSlope as follows: >>> > >>> > LinRegR2(lastperiods(60), [Measures].[Growth_Avg], ?????) >>> > >>> > I would like to regress the growth_avg measure against the following >>> > series (1,2,3,...,60). So, essentially I'm regressing against a time >>> > series from 1 to 60. I cannot seem to figure out how to fill in the >>> > question marks with a set of numbers going from 1 to 60. >>> > >>> > Any help would be appreciated. >>> > >>> ------=_NextPart_000_0AE6_01C6C211.8268B2D0 >>> Content-Type: text/html; charset=iso-8859-1 >>> Content-Transfer-Encoding: quoted-printable >>> X-Google-AttachSize: 4199 >>> >>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> >>> <HTML><HEAD> >>> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> >>> <META content="MSHTML 6.00.5296.0" name=GENERATOR> >>> <STYLE></STYLE> >>> </HEAD> >>> <BODY> >>> <DIV><FONT face=Arial size=2>I'm a little confused about your >>> request.</FONT></DIV> >>> <DIV><FONT face=Arial size=2></FONT> </DIV> >>> <DIV> >>> <P class=MsoNormal >>> style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN >>> style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-no-proof: >>> yes">It >>> would help us better assist you if you could include table DDL, query >>> strategy >>> used so far, sample data in the form of INSERT statements, and an >>> illustration >>> of the desired results. (For help with that refer to: >>> http://www.aspfaq.com/5006 >>> ) <?xml:namespace prefix = o ns = >>> "urn:schemas-microsoft-com:office:office" >>> /><o:p></o:p></SPAN></P> >>> <P class=MsoNormal >>> style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN >>> style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-no-proof: >>> yes"><o:p> </o:p></SPAN></P> >>> <P class=MsoNormal >>> style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN >>> style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-no-proof: >>> yes">The >>> less 'set up' work we have to do, the more likely you are going to have >>> folks >>> tackle your problem and help you. Without this effort from you, we are >>> just >>> playing guessing games. <o:p></o:p></SPAN></P></DIV> >>> <DIV><FONT face=Arial size=2></FONT> </DIV> >>> <DIV><FONT face=Arial size=2>Is it that you want to execute LinRegR2 in >>> a loop, >>> 60 times, each time with an increasing value in the last position? Or do >>> you >>> want to replace the question marks with a comma delimited series of >>> numbers, >>> i.e., 1,2,3,4,5...?</FONT></DIV> >>> <DIV><FONT face=Arial size=2></FONT> </DIV> >>> <DIV><FONT face=Arial size=2>Perhaps something like >>> this:</FONT></DIV> >>> <DIV><FONT face=Arial size=2></FONT> </DIV> >>> <DIV><FONT face="Courier New" size=2>DECLARE Counter int</FONT></DIV> >>> <DIV><FONT face="Courier New" size=2>SET Counter = 1</FONT></DIV> >>> <DIV><FONT face="Courier New" size=2></FONT> </DIV> >>> <DIV><FONT face="Courier New" size=2>WHILE Counter <= 60</FONT></DIV> >>> <DIV><FONT face="Courier New" size=2> BEGIN</FONT></DIV> >>> <DIV><FONT face="Courier New" size=2> >>> EXECUTE >>> LinRegR2(lastperiods(60), [Measures].[Growth_Avg], >>> Counter)<BR> SET Counter = ( Counter + 1 >>> )</FONT></DIV> >>> <DIV><FONT face="Courier New" size=2> END</FONT></DIV> >>> <DIV><BR><FONT face=Arial size=2>-- <BR>Arnie Rowland, Ph.D.<BR>Westwood >>> Consulting, Inc</FONT></DIV> >>> <DIV><FONT face=Arial size=2></FONT> </DIV> >>> <DIV><FONT face=Arial size=2>Most good judgment comes from experience. >>> <BR>Most >>> experience comes from bad judgment. <BR>- Anonymous</FONT></DIV> >>> <DIV><FONT face=Arial size=2></FONT> </DIV> >>> <DIV><FONT face=Arial size=2></FONT> </DIV> >>> <DIV><FONT face=Arial size=2>"Ash" <</FONT><A >>> href="mailto:ashv***@gmail.com"><FONT face=Arial >>> size=2>ashv***@gmail.com</FONT></A><FONT face=Arial size=2>> wrote in >>> message >>> </FONT><A >>> href="news:1155842409.256941.221***@h48g2000cwc.googlegroups.com"><FONT >>> face=Arial >>> size=2>news:1155842409.256941.221370@h48g2000cwc.googlegroups.com</FONT></A><FONT >>> face=Arial size=2>...</FONT></DIV><FONT face=Arial size=2>> Hi >>> All,<BR>> >>> <BR>> I'm currently trying to use LinRegSlope as follows:<BR>> >>> <BR>> >>> LinRegR2(lastperiods(60), [Measures].[Growth_Avg], ?????)<BR>> >>> <BR>> I >>> would like to regress the growth_avg measure against the >>> following<BR>> >>> series (1,2,3,...,60). So, essentially I'm regressing against a >>> time<BR>> series from 1 to 60. I cannot seem to figure out how >>> to fill >>> in the<BR>> question marks with a set of numbers going from 1 to >>> 60.<BR>> >>> <BR>> Any help would be appreciated.<BR>></FONT></BODY></HTML> >>> >>> ------=_NextPart_000_0AE6_01C6C211.8268B2D0-- >> > > |
|||||||||||||||||||||||