<?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 How to find the product churn on a month on month basis in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-find-the-product-churn-on-a-month-on-month-basis/m-p/742679#M38833</link>
    <description>Hi All&lt;BR /&gt;&lt;BR /&gt;I have a dataset like this&lt;BR /&gt;Id pcp_id date&lt;BR /&gt;1 2222 202001&lt;BR /&gt;1 2222 202002&lt;BR /&gt;1 3333 202003&lt;BR /&gt;1 3333 202004&lt;BR /&gt;1 3333 202005&lt;BR /&gt;&lt;BR /&gt;So the output should be like&lt;BR /&gt;Whenever the pcp_id for a id changes is a churn and should be in the output, so in the above case the pcp changes at 202003 so it has to be the output.&lt;BR /&gt;&lt;BR /&gt;Need your help to build a logic for this.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance</description>
    <pubDate>Thu, 20 May 2021 15:29:02 GMT</pubDate>
    <dc:creator>Nimish28</dc:creator>
    <dc:date>2021-05-20T15:29:02Z</dc:date>
    <item>
      <title>How to find the product churn on a month on month basis</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-find-the-product-churn-on-a-month-on-month-basis/m-p/742679#M38833</link>
      <description>Hi All&lt;BR /&gt;&lt;BR /&gt;I have a dataset like this&lt;BR /&gt;Id pcp_id date&lt;BR /&gt;1 2222 202001&lt;BR /&gt;1 2222 202002&lt;BR /&gt;1 3333 202003&lt;BR /&gt;1 3333 202004&lt;BR /&gt;1 3333 202005&lt;BR /&gt;&lt;BR /&gt;So the output should be like&lt;BR /&gt;Whenever the pcp_id for a id changes is a churn and should be in the output, so in the above case the pcp changes at 202003 so it has to be the output.&lt;BR /&gt;&lt;BR /&gt;Need your help to build a logic for this.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance</description>
      <pubDate>Thu, 20 May 2021 15:29:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-find-the-product-churn-on-a-month-on-month-basis/m-p/742679#M38833</guid>
      <dc:creator>Nimish28</dc:creator>
      <dc:date>2021-05-20T15:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the product churn on a month on month basis</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-find-the-product-churn-on-a-month-on-month-basis/m-p/742681#M38834</link>
      <description>&lt;P&gt;Use BY group processing and the LAG function in a subsetting IF in a data step:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
by id;
if not first.id and lag(pcp_id) ne pcp_id;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 May 2021 15:35:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-find-the-product-churn-on-a-month-on-month-basis/m-p/742681#M38834</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-05-20T15:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the product churn on a month on month basis</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-find-the-product-churn-on-a-month-on-month-basis/m-p/742708#M38837</link>
      <description>Thank You Kurt , logic worked absolutely fine.</description>
      <pubDate>Thu, 20 May 2021 16:50:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-find-the-product-churn-on-a-month-on-month-basis/m-p/742708#M38837</guid>
      <dc:creator>Nimish28</dc:creator>
      <dc:date>2021-05-20T16:50:37Z</dc:date>
    </item>
  </channel>
</rss>

