<?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: Creation of in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Creation-of-up-counting-ID-variables-per-group-not-according-to/m-p/330425#M62606</link>
    <description>&lt;P&gt;Thank you very much indeed -&lt;/P&gt;&lt;P&gt;it once again is truly breathtaking, how fast I receive responses.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Feb 2017 09:32:42 GMT</pubDate>
    <dc:creator>Sinistrum</dc:creator>
    <dc:date>2017-02-07T09:32:42Z</dc:date>
    <item>
      <title>Creation of up-counting ID variables per group, not according to distinct variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creation-of-up-counting-ID-variables-per-group-not-according-to/m-p/330416#M62603</link>
      <description>&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would be very glad, if you could help concerning the following issue.&lt;/P&gt;&lt;P&gt;Please consider the following table (as also attached as sas7bdat) I am faced with&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7119i88092FEE0A10AFCB/image-size/original?v=1.0&amp;amp;px=-1" alt="Have.PNG" title="Have.PNG" border="0" /&gt;&lt;/P&gt;&lt;P&gt;, as well as the table I do want to end up with:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7120iCB62367D1D3DF524/image-size/original?v=1.0&amp;amp;px=-1" alt="Want.PNG" title="Want.PNG" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The scenario, thus, is the following:&lt;/P&gt;&lt;P&gt;I have a table with companies. This table contains "beginning_date" as well as "ending_date" - this variables define, from "when to when" the row-information hold valid. As an example, I added information towards the "quality" of the offered product.&lt;/P&gt;&lt;P&gt;Object of interest is the "manager" - I want to end up with a data set, listing up&lt;/P&gt;&lt;P&gt;which manager&lt;/P&gt;&lt;P&gt;works in which time span&lt;/P&gt;&lt;P&gt;for which company, i.e.:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7121i9E3A1DD1F5111F3F/image-size/original?v=1.0&amp;amp;px=-1" alt="List.PNG" title="List.PNG" border="0" /&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Tom" at "Mario's Apples" is the problem -&lt;/P&gt;&lt;P&gt;I cannot just simply take&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=have noprint;
	output out=list (drop = _FREQ_ _TYPE_)
	min(beginning_date)	=	beg_date_manager
	max(ending_date)		=	end_date_manager;
	by
		company
		Manager;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;, because then it would appear as if "Tom" would have worked all time at "Mario's Apples".&lt;/P&gt;&lt;P&gt;If I had this nice ID-variable, I were able to include it in my by-statement and I was fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if someone could please tell me how to create this very ID (because in general it would help me to know how to do it) or otherwise could provide me with a means of how to solve my problem, for the means of which I have thought of appears as rather clumsy to me ("there for sure is a much more sophisticated solution"), I would be very glad.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yours sincerely,&lt;BR /&gt;Sinistrum&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2017 09:34:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creation-of-up-counting-ID-variables-per-group-not-according-to/m-p/330416#M62603</guid>
      <dc:creator>Sinistrum</dc:creator>
      <dc:date>2017-02-07T09:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: Creation of</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creation-of-up-counting-ID-variables-per-group-not-according-to/m-p/330420#M62604</link>
      <description>&lt;P&gt;Post test data in the form of a datastep in the body of the post, I don't download files, or type in test data. &amp;nbsp;So this is just a rough outline. &amp;nbsp;You should just be able to increment at each new manager:&lt;/P&gt;
&lt;PRE&gt;data want;
  set have;
  by company manager notsorted;
  retain id;
  if first.company then id=0;
  if first.manager then id=sum(id,1);
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2017 09:24:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creation-of-up-counting-ID-variables-per-group-not-according-to/m-p/330420#M62604</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-02-07T09:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: Creation of</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creation-of-up-counting-ID-variables-per-group-not-according-to/m-p/330425#M62606</link>
      <description>&lt;P&gt;Thank you very much indeed -&lt;/P&gt;&lt;P&gt;it once again is truly breathtaking, how fast I receive responses.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2017 09:32:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creation-of-up-counting-ID-variables-per-group-not-according-to/m-p/330425#M62606</guid>
      <dc:creator>Sinistrum</dc:creator>
      <dc:date>2017-02-07T09:32:42Z</dc:date>
    </item>
  </channel>
</rss>

