<?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 difference between two data sets - help required in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/difference-between-two-data-sets-help-required/m-p/881394#M348266</link>
    <description>&lt;P&gt;Need help in below code for weekly representation of data using sas proc sql.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Expired Insurances&lt;/TD&gt;&lt;TD&gt;12-Jun-23&lt;/TD&gt;&lt;TD&gt;19-Jun-23&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Team&lt;/TD&gt;&lt;TD&gt;Support Manager&lt;/TD&gt;&lt;TD&gt;Total Cases&lt;/TD&gt;&lt;TD&gt;Cases Resolved&lt;/TD&gt;&lt;TD&gt;% of Resolved&lt;/TD&gt;&lt;TD&gt;Cases Added&lt;/TD&gt;&lt;TD&gt;Cases Pending as of today&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AAAA&lt;/TD&gt;&lt;TD&gt;AB&lt;/TD&gt;&lt;TD&gt;21&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;14%&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;25&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;BBBB&lt;/TD&gt;&lt;TD&gt;BC&lt;/TD&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;18%&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here I have raw data for 12june and 19 june. Based on docid i have find total cases , cases resolved and cased added details as above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;wrote separte queries to get current week and past week data as below. Need help to join two data sets and get all above info in one table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table Current_Week_Cases&lt;BR /&gt;as select distinct A.Current_week as Current_week,&lt;BR /&gt;A.'Support Manager'n,&lt;BR /&gt;A.Team,&lt;BR /&gt;A.'Document Type'n,&lt;BR /&gt;A.'Doc register ID'n,&lt;BR /&gt;count(A.'Doc register ID'n) as 'Total Cases'n&lt;BR /&gt;from (select Current_week,Team,'Support Manager'n,'Doc register ID'n,'Document Type'n from WBG.Exception_Report where Current_week="&amp;amp;StartWeek."d and&lt;BR /&gt;'Document Type'n='Insurance' and 'Document Status'n='Expired') as A&lt;BR /&gt;group by A.Current_week,A.Team;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table Previous_Week_Cases&lt;BR /&gt;as select distinct A.Current_week as Current_week,&lt;BR /&gt;A.'Support Manager'n,&lt;BR /&gt;A.Team,A.'Document Type'n,&lt;BR /&gt;A.'Doc register ID'n,&lt;BR /&gt;count(A.'Doc register ID'n) as 'Total Cases'n&lt;BR /&gt;from (select Current_week,Team,'Support Manager'n,'Doc register ID'n,'Document Type'n from WBG.Exception_Report where Current_week="&amp;amp;PrevWeek."d and&lt;BR /&gt;'Document Type'n='Insurance' and 'Document Status'n='Expired') as A&lt;BR /&gt;group by A.Current_week,A.Team;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;Logic :-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Total cases :- count of doc id for previous week&lt;/P&gt;&lt;P&gt;cases resolved :- doc ids in past week but not present in current week&lt;/P&gt;&lt;P&gt;cases added&amp;nbsp; : doc ids in current week but not in past week&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Jun 2023 13:27:17 GMT</pubDate>
    <dc:creator>SASUserRocks</dc:creator>
    <dc:date>2023-06-19T13:27:17Z</dc:date>
    <item>
      <title>difference between two data sets - help required</title>
      <link>https://communities.sas.com/t5/SAS-Programming/difference-between-two-data-sets-help-required/m-p/881394#M348266</link>
      <description>&lt;P&gt;Need help in below code for weekly representation of data using sas proc sql.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Expired Insurances&lt;/TD&gt;&lt;TD&gt;12-Jun-23&lt;/TD&gt;&lt;TD&gt;19-Jun-23&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Team&lt;/TD&gt;&lt;TD&gt;Support Manager&lt;/TD&gt;&lt;TD&gt;Total Cases&lt;/TD&gt;&lt;TD&gt;Cases Resolved&lt;/TD&gt;&lt;TD&gt;% of Resolved&lt;/TD&gt;&lt;TD&gt;Cases Added&lt;/TD&gt;&lt;TD&gt;Cases Pending as of today&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AAAA&lt;/TD&gt;&lt;TD&gt;AB&lt;/TD&gt;&lt;TD&gt;21&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;14%&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;25&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;BBBB&lt;/TD&gt;&lt;TD&gt;BC&lt;/TD&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;18%&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here I have raw data for 12june and 19 june. Based on docid i have find total cases , cases resolved and cased added details as above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;wrote separte queries to get current week and past week data as below. Need help to join two data sets and get all above info in one table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table Current_Week_Cases&lt;BR /&gt;as select distinct A.Current_week as Current_week,&lt;BR /&gt;A.'Support Manager'n,&lt;BR /&gt;A.Team,&lt;BR /&gt;A.'Document Type'n,&lt;BR /&gt;A.'Doc register ID'n,&lt;BR /&gt;count(A.'Doc register ID'n) as 'Total Cases'n&lt;BR /&gt;from (select Current_week,Team,'Support Manager'n,'Doc register ID'n,'Document Type'n from WBG.Exception_Report where Current_week="&amp;amp;StartWeek."d and&lt;BR /&gt;'Document Type'n='Insurance' and 'Document Status'n='Expired') as A&lt;BR /&gt;group by A.Current_week,A.Team;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table Previous_Week_Cases&lt;BR /&gt;as select distinct A.Current_week as Current_week,&lt;BR /&gt;A.'Support Manager'n,&lt;BR /&gt;A.Team,A.'Document Type'n,&lt;BR /&gt;A.'Doc register ID'n,&lt;BR /&gt;count(A.'Doc register ID'n) as 'Total Cases'n&lt;BR /&gt;from (select Current_week,Team,'Support Manager'n,'Doc register ID'n,'Document Type'n from WBG.Exception_Report where Current_week="&amp;amp;PrevWeek."d and&lt;BR /&gt;'Document Type'n='Insurance' and 'Document Status'n='Expired') as A&lt;BR /&gt;group by A.Current_week,A.Team;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;Logic :-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Total cases :- count of doc id for previous week&lt;/P&gt;&lt;P&gt;cases resolved :- doc ids in past week but not present in current week&lt;/P&gt;&lt;P&gt;cases added&amp;nbsp; : doc ids in current week but not in past week&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 13:27:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/difference-between-two-data-sets-help-required/m-p/881394#M348266</guid>
      <dc:creator>SASUserRocks</dc:creator>
      <dc:date>2023-06-19T13:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: difference between two data sets - help required</title>
      <link>https://communities.sas.com/t5/SAS-Programming/difference-between-two-data-sets-help-required/m-p/881395#M348267</link>
      <description>&lt;P&gt;Can you please be kind enough to show us a portion of this data before you performed this SQL on it? Can you please be kind enough to show us the desired output?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 13:58:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/difference-between-two-data-sets-help-required/m-p/881395#M348267</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-06-19T13:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: difference between two data sets - help required</title>
      <link>https://communities.sas.com/t5/SAS-Programming/difference-between-two-data-sets-help-required/m-p/881397#M348269</link>
      <description>Desired output is given in grid</description>
      <pubDate>Mon, 19 Jun 2023 14:10:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/difference-between-two-data-sets-help-required/m-p/881397#M348269</guid>
      <dc:creator>SASUserRocks</dc:creator>
      <dc:date>2023-06-19T14:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: difference between two data sets - help required</title>
      <link>https://communities.sas.com/t5/SAS-Programming/difference-between-two-data-sets-help-required/m-p/881398#M348270</link>
      <description>&lt;P&gt;Repeating&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Can you please be kind enough to show us a portion of this data before you performed this SQL on it?&lt;/FONT&gt;&lt;/STRONG&gt; Can you please be kind enough to show us the desired output?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Also, is the desired output a SAS data set, or a report that you can print or include in a document?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 14:13:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/difference-between-two-data-sets-help-required/m-p/881398#M348270</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-06-19T14:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: difference between two data sets - help required</title>
      <link>https://communities.sas.com/t5/SAS-Programming/difference-between-two-data-sets-help-required/m-p/881401#M348272</link>
      <description>&lt;P&gt;Here is sample portion of data :- Output needs to be in data set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;Current_week RM Name PC Code PC Name CID Customer Code Team Support Manager Doc register ID Client Name Description / Remarks Document Class Document Type Document Name Document Date Document Status Expiry Date Ageing (Days) Query Amount&lt;BR /&gt;12-Jun-23 Rajesh Kohly 290 AAN Corporate XXX XXX AUH CORP Mazen Al Masoud 1205790 Security / Collateral Mortgage Supporting Docs Valuation Report 12MAY22:00:00:00 Expired 11/5/2023 39 More than 15 Days .&lt;BR /&gt;12-Jun-23 Riyaz Hibtullah Attari 290 AAN Corporate XXX XXX AUH CORP Mazen Al Masoud 1028883 Customer Source Docs Trade Licence Copy 24MAY22:00:00:00 Expired 3/6/2023 16 More than 15 Days .&lt;BR /&gt;12-Jun-23 Ali Ahmed 290 AAN Corporate XXX XXX AUH CORP Mazen Al Masoud 1145878 Security / Collateral Shares Share Pledge 23MAR22:00:00:00 Condition Subsequent (Post-facto) EDR-Lapsed 23/06/2022 361 More than 15 Days .&lt;BR /&gt;12-Jun-23 Ali Ahmed 290 AAN Corporate XXX XXX AUH CORP Mazen Al Masoud 860375 Charge Document Ancillary Docs Misc. Documents 21MAR22:00:00:00 Expired 20/03/2023 91 More than 15 Days .&lt;BR /&gt;12-Jun-23 Mohammed Nihad Al Sare Khea 290 AAN Corporate XXX XXX AUH CORP Mazen Al Masoud 119406 Customer Source Docs Trade Licence Copy 05OCT21:00:00:00 Deferral Expired 31/05/2023 19 More than 15 Days .&lt;BR /&gt;12-Jun-23 Riyaz Hibtullah Attari 290 AAN Corporate XXX XXX AUH CORP Mazen Al Masoud 697052 Customer Source Docs Trade Licence Copy 03JUN13:00:00:00 Expired 2/6/2023 17 More than 15 Days .&lt;BR /&gt;12-Jun-23 Mohammed Nihad Al Sare Khea 290 AAN Corporate XXX XXX AUH CORP Mazen Al Masoud 1205728 Security / Collateral Mortgage Supporting Docs Valuation Report 25MAY21:00:00:00 Expired 24/05/2023 26 More than 15 Days .&lt;BR /&gt;12-Jun-23 Khaled Ahmed Mohamed Hassan 290 AAN Corporate XXX XXX AUH CORP Mazen Al Masoud 853057 Charge Document Charge Docs Promissory Note 30MAY22:00:00:00 Expired 29/05/2023 21 More than 15 Days .&lt;BR /&gt;12-Jun-23 Ali Ahmed 290 AAN Corporate XXX XXX AUH CORP Mazen Al Masoud 1157720 Syndication and External Documents Syndication &amp;amp; Externally Prepared Docs Others 25MAR22:00:00:00 Condition Subsequent (Post-facto) EDR-Lapsed 1/4/2022 444 More than 15 Days .&lt;BR /&gt;12-Jun-23 Ali Ahmed 622 AAN Corporate XXX XXX AUH CORP Mazen Al Masoud 854274 Charge Document Charge Docs Promissory Note 06MAY20:00:00:00 Expired 5/5/2023 45 More than 15 Days .&lt;BR /&gt;19-Jun-23 Ahmed Amer 288 AAN Government Clients XXX XXX AUH GOV Hassan Darwish 1129920 Security / Collateral Shares Share Pledge 24NOV20:00:00:00 Condition Subsequent (Post-facto) EDR-Lapsed 11/11/2020 950 More than 15 Days .&lt;BR /&gt;19-Jun-23 Omar Mustafa 288 AAN Government Clients XXX XXX AUH GOV Hassan Darwish 1190672 Agreements Conventional Amendment of Credit Facility Agreement . Condition Subsequent (Post-facto) EDR-Lapsed 27/07/2022 327 More than 15 Days .&lt;BR /&gt;19-Jun-23 Ahmed Amer 501 AAN Government Clients XXX XXX AUH GOV Hassan Darwish 956262 Syndication and External Documents Syndication &amp;amp; Externally Prepared Docs Others . Defective (Incomplete) 16/04/2021 794 More than 15 Days .&lt;BR /&gt;19-Jun-23 Ahmed Amer 501 AAN Government Clients XXX XXX AUH GOV Hassan Darwish 837015 Customer Source Docs Trade Licence Copy 17JAN22:00:00:00 Expired 16/01/2023 154 More than 15 Days .&lt;BR /&gt;19-Jun-23 Ahmed Amer 288 AAN Government Clients XXX XXX AUH GOV Hassan Darwish 862777 Syndication and External Documents Syndication &amp;amp; Externally Prepared Docs Others 14OCT20:00:00:00 Condition Subsequent (Post-facto) EDR-Lapsed 15/12/2020 916 More than 15 Days .&lt;BR /&gt;19-Jun-23 Mona Abuobaida 288 AAN Government Clients XXX XXX AUH GOV Hassan Darwish 1353526 Charge Document Charge Docs Appointment of Service Agent 03APR23:00:00:00 Defective (Incomplete) 7/6/2023 12 .&lt;BR /&gt;19-Jun-23 Ahmed Amer 288 AAN Government Clients XXX XXX AUH GOV Hassan Darwish 958688 Customer Source Docs Trade Licence Copy 18MAY22:00:00:00 Expired 4/6/2023 15 More than 15 Days .&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 14:42:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/difference-between-two-data-sets-help-required/m-p/881401#M348272</guid>
      <dc:creator>SASUserRocks</dc:creator>
      <dc:date>2023-06-19T14:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: difference between two data sets - help required</title>
      <link>https://communities.sas.com/t5/SAS-Programming/difference-between-two-data-sets-help-required/m-p/881402#M348273</link>
      <description>&lt;P&gt;My mistake ... I forgot to mention that data must be in the form of &lt;FONT color="#FF6600"&gt;WORKING&lt;/FONT&gt; SAS data step code. Here are &lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;examples and instructions&lt;/A&gt;. I can't work with what you have provided.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 14:45:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/difference-between-two-data-sets-help-required/m-p/881402#M348273</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-06-19T14:45:35Z</dc:date>
    </item>
  </channel>
</rss>

