<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Finding the average distance traveled per purchase. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Finding-the-average-distance-traveled-per-purchase/m-p/686329#M208231</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/347128"&gt;@Garzaluis998&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am having problems with figuring out the code to find the avg distance traveled per purchase on a dataset. I seem to keep getting error.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Don't make us guess what the error is. &lt;STRONG&gt;SHOW US&lt;/STRONG&gt; the error. If it is an error that appears in the LOG, &lt;STRONG&gt;show us the ENTIRE log for the PROC SUMMARY step&lt;/STRONG&gt;, including CODE as it appears in the log, and all NOTEs, WARNINGs and ERRORs in the log for PROC SUMMARY.&lt;/P&gt;</description>
    <pubDate>Thu, 24 Sep 2020 10:41:10 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2020-09-24T10:41:10Z</dc:date>
    <item>
      <title>Finding the average distance traveled per purchase.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-the-average-distance-traveled-per-purchase/m-p/686285#M208208</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having problems with figuring out the code to find the avg distance traveled per purchase on a dataset. I seem to keep getting error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found the average on purchases and average on distance traveled with the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc summary data=have nway;&lt;BR /&gt;class location_id;&lt;BR /&gt;var purchases;&lt;BR /&gt;output out=want (drop=_:)&lt;BR /&gt;mean=avgdist;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc summary data=have nway;&lt;BR /&gt;class location_id;&lt;BR /&gt;var milestravelled;&lt;BR /&gt;output out=want (drop=_:)&lt;BR /&gt;mean=avgdist;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need help in finding the avg distance traveled per purchase.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 06:03:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-the-average-distance-traveled-per-purchase/m-p/686285#M208208</guid>
      <dc:creator>Garzaluis998</dc:creator>
      <dc:date>2020-09-24T06:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the average distance traveled per purchase.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-the-average-distance-traveled-per-purchase/m-p/686287#M208209</link>
      <description>&lt;P&gt;If variable purchases is a count, use it in a WEIGHT statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS you will want to invert it first.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 06:11:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-the-average-distance-traveled-per-purchase/m-p/686287#M208209</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-09-24T06:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the average distance traveled per purchase.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-the-average-distance-traveled-per-purchase/m-p/686329#M208231</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/347128"&gt;@Garzaluis998&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am having problems with figuring out the code to find the avg distance traveled per purchase on a dataset. I seem to keep getting error.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Don't make us guess what the error is. &lt;STRONG&gt;SHOW US&lt;/STRONG&gt; the error. If it is an error that appears in the LOG, &lt;STRONG&gt;show us the ENTIRE log for the PROC SUMMARY step&lt;/STRONG&gt;, including CODE as it appears in the log, and all NOTEs, WARNINGs and ERRORs in the log for PROC SUMMARY.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 10:41:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-the-average-distance-traveled-per-purchase/m-p/686329#M208231</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-09-24T10:41:10Z</dc:date>
    </item>
  </channel>
</rss>

