<?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 Question about filtering data - please help! in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Question-about-filtering-data-please-help/m-p/31487#M4183</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm a SAS newbie, and I have a pretty simple question:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have about 20 data sets representing specific sections of a road network, and each have 2 columns that I am interested in: Vehicle_ID and Time_Step. At each time step (1 second), the data set lists the the vehicles which are at a particular position on that section of the road. I would like to match the Vehicle_ID in all tables and obtain the vehicles that are travelling along the entire route in the&lt;/P&gt;&lt;P&gt;network. For each of these vehicles, I would like to find the total travel from from the time steps. I was wondering if there is a simple way in which to filter the data in each data set to give me the&lt;/P&gt;&lt;P&gt;Vehicle_IDs and a count of the corresponding Time_Steps in which the vehicle appeared on the section. For example, if Vehicle 2242 was found to be in the data set at Time_Steps 43, 44, 45, 46, 47, 48 then it was travelling for 6 seconds on that section. Its a relatively simple calculation but I am having trouble performing the filtering on 20+ large data sets.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would really appreciate it anyone could give me some advice on how I might be able to do this in SAS or forward my question to someone who could help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Oct 2011 14:38:10 GMT</pubDate>
    <dc:creator>Anya</dc:creator>
    <dc:date>2011-10-19T14:38:10Z</dc:date>
    <item>
      <title>Question about filtering data - please help!</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Question-about-filtering-data-please-help/m-p/31487#M4183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm a SAS newbie, and I have a pretty simple question:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have about 20 data sets representing specific sections of a road network, and each have 2 columns that I am interested in: Vehicle_ID and Time_Step. At each time step (1 second), the data set lists the the vehicles which are at a particular position on that section of the road. I would like to match the Vehicle_ID in all tables and obtain the vehicles that are travelling along the entire route in the&lt;/P&gt;&lt;P&gt;network. For each of these vehicles, I would like to find the total travel from from the time steps. I was wondering if there is a simple way in which to filter the data in each data set to give me the&lt;/P&gt;&lt;P&gt;Vehicle_IDs and a count of the corresponding Time_Steps in which the vehicle appeared on the section. For example, if Vehicle 2242 was found to be in the data set at Time_Steps 43, 44, 45, 46, 47, 48 then it was travelling for 6 seconds on that section. Its a relatively simple calculation but I am having trouble performing the filtering on 20+ large data sets.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would really appreciate it anyone could give me some advice on how I might be able to do this in SAS or forward my question to someone who could help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Oct 2011 14:38:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Question-about-filtering-data-please-help/m-p/31487#M4183</guid>
      <dc:creator>Anya</dc:creator>
      <dc:date>2011-10-19T14:38:10Z</dc:date>
    </item>
    <item>
      <title>Question about filtering data - please help!</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Question-about-filtering-data-please-help/m-p/31488#M4184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A couple of questions:&lt;/P&gt;&lt;P&gt;Does it have to be a filtering specific solution or can it be a datastep or proc sql solution&lt;/P&gt;&lt;P&gt;Is there a chance that vehciles might have missing Time_Steps and, if so, what would you want as a result if a vehicle had something like Time_Steps 43, 44, 46, 47, 48? or 1,2,3,46,47,48?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Oct 2011 15:22:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Question-about-filtering-data-please-help/m-p/31488#M4184</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-10-19T15:22:23Z</dc:date>
    </item>
    <item>
      <title>Question about filtering data - please help!</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Question-about-filtering-data-please-help/m-p/31489#M4185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. It doesn't have to be a filtering specific solution. &lt;/P&gt;&lt;P&gt;2. I think the time steps would generally be in a sequence because a simulation tracked the vehicle's position through a particular section for every second - so its not likely that the time steps will look like 1,2,3,46,47,48 because (hopefully) no vehicles get sucked into a black hole of traffic while travelling on a section&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Oct 2011 15:32:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Question-about-filtering-data-please-help/m-p/31489#M4185</guid>
      <dc:creator>Anya</dc:creator>
      <dc:date>2011-10-19T15:32:50Z</dc:date>
    </item>
    <item>
      <title>Question about filtering data - please help!</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Question-about-filtering-data-please-help/m-p/31490#M4186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then wouldn't something like the following suffice?:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input vehicle time_step;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;1 23&lt;/P&gt;&lt;P&gt;1 24&lt;/P&gt;&lt;P&gt;1 25&lt;/P&gt;&lt;P&gt;2 52&lt;/P&gt;&lt;P&gt;2 53&lt;/P&gt;&lt;P&gt;2 54&lt;/P&gt;&lt;P&gt;2 55&lt;/P&gt;&lt;P&gt;3 34&lt;/P&gt;&lt;P&gt;3 35&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table want as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select distinct vehicle,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max(time_step)-min(time_step) +1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from have&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; group by vehicle&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Oct 2011 16:31:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Question-about-filtering-data-please-help/m-p/31490#M4186</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-10-19T16:31:48Z</dc:date>
    </item>
    <item>
      <title>Question about filtering data - please help!</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Question-about-filtering-data-please-help/m-p/31491#M4187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you..it worked!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Oct 2011 13:57:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Question-about-filtering-data-please-help/m-p/31491#M4187</guid>
      <dc:creator>Anya</dc:creator>
      <dc:date>2011-10-20T13:57:43Z</dc:date>
    </item>
  </channel>
</rss>

