<?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 Comparing Same Reports of two different dates in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Two-Reports-generated-through-SAS-and-highlighting-the/m-p/283856#M311473</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a two reports generated through SAS. Let's say, the first report is of dt. 1st July 2016 and the second report is of today's date or any after 1st July. Both of them are having same columns except some updates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I want to create a report for today's date that will highlight all the new/old/changed&amp;nbsp;entries from the past report. The report should highlight what are the new entries (that should be highlighted as New) as well as if there are any changes in the existing observation from the old report then it should be highlighted as 'Changed'. And if the value is changed then the old value should be displayed in the next column of the report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;E.g. - If the old report is showing that the Emp number 20001 had sold 10 items and the new report is showing that he had sold 15 item then it should be&amp;nbsp;flagged as a 'Changed' and I want to highlight what was the old value for that instance if the value is changed, in the next column (See the sample table below). Same should be&amp;nbsp;displayed for every column&amp;nbsp;from the report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table A: (Dt. 1st July 2016)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Emp Number &amp;nbsp; &amp;nbsp;Items Sold &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Revenue&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;20001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 15 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$135&lt;/P&gt;&lt;P&gt;20002 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $99&lt;/P&gt;&lt;P&gt;20003 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;10 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$95&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tabel A : (Today's Report to be shown like)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Emp Number &amp;nbsp; &amp;nbsp;Items Sold &amp;nbsp; &amp;nbsp; Items Sold (as per old file) &amp;nbsp; &amp;nbsp; Revenue &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;Revenue (as per old file) &amp;nbsp; &amp;nbsp; &amp;nbsp;Flag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;20001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 15 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;15 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$135 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$135 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Old&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;20002 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $99 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Changed&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;20003 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 13 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;10 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $95 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$95 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Changed&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;20004 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;12 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; . &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $110 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; . &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; New &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My approach&amp;nbsp;is bit lengthy, I guess. What I do is :&lt;/P&gt;&lt;P&gt;1. I Run the Report as per today's input files and rename the variables by adding prefix&amp;nbsp;as 'New' (E.g. New_Items_Sold, etc.)&lt;/P&gt;&lt;P&gt;2. Import the old Report and r&lt;SPAN&gt;ename its variables by adding prefix&amp;nbsp;as 'Old' (E.g. Old_Items_Sold, etc.)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;3. check their values by using if conditions and if the values are not same then I flag it as 'Changed' and if new Emp Number found then I flagged it as 'New'&lt;/P&gt;&lt;P&gt;4. Then again export the report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any different approach that will reduce my time? Please share it if any.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Vikrant&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jul 2016 18:11:50 GMT</pubDate>
    <dc:creator>VikrantSawatkar</dc:creator>
    <dc:date>2016-07-12T18:11:50Z</dc:date>
    <item>
      <title>Comparing Two Reports generated through SAS and highlighting the changes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Two-Reports-generated-through-SAS-and-highlighting-the/m-p/283857#M311471</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a two reports generated through SAS. Let's say, the first report is of dt. 1st July 2016 and the second report is of today's date or any after 1st July. Both of them are having same columns except some updates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I want to create a report for today's date that will highlight all the new/old/changed&amp;nbsp;entries from the past report. The report should highlight what are the new entries (that should be highlighted as New) as well as if there are any changes in the existing observation from the old report then it should be highlighted as 'Changed'. And if the value is changed then the old value should be displayed in the next column of the report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;E.g. - If the old report is showing that the Emp number 20001 had sold 10 items and the new report is showing that he had sold 15 item then it should be&amp;nbsp;flagged as a 'Changed' and I want to highlight what was the old value for that instance if the value is changed, in the next column (See the sample table below). Same should be&amp;nbsp;displayed for every column&amp;nbsp;from the report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table A: (Dt. 1st July 2016)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Emp Number &amp;nbsp; &amp;nbsp;Items Sold &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Revenue&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;20001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 15 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$135&lt;/P&gt;&lt;P&gt;20002 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $99&lt;/P&gt;&lt;P&gt;20003 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;10 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$95&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tabel A : (Today's Report to be shown like)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Emp Number &amp;nbsp; &amp;nbsp;Items Sold &amp;nbsp; &amp;nbsp; Items Sold &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Revenue &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;Revenue &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Flag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(as per old file) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;(as per old file)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;20001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 15 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;15 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$135 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$135 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Old&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;20002 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$99 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Changed&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;20003 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 13 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;10 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$95 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $95 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Changed&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;20004 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;12 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; . &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $110 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; . &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; New &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My approach&amp;nbsp;is bit lengthy, I guess. What I do is :&lt;/P&gt;&lt;P&gt;1. I Run the Report as per today's input files and rename the variables by adding prefix&amp;nbsp;as 'New' (E.g. New_Items_Sold, etc.)&lt;/P&gt;&lt;P&gt;2. Import the old Report and r&lt;SPAN&gt;ename its variables by adding prefix&amp;nbsp;as 'Old' (E.g. Old_Items_Sold, etc.)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;3. check their values by using if conditions and if the values are not same then I flag it as 'Changed' and if new Emp Number found then I flagged it as 'New'&lt;/P&gt;&lt;P&gt;4. Then again export the report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any different approach that will reduce my time? Please share it if any.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Vikrant&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2016 18:16:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-Two-Reports-generated-through-SAS-and-highlighting-the/m-p/283857#M311471</guid>
      <dc:creator>VikrantSawatkar</dc:creator>
      <dc:date>2016-07-12T18:16:23Z</dc:date>
    </item>
    <item>
      <title>Comparing Same Reports of two different dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Two-Reports-generated-through-SAS-and-highlighting-the/m-p/283856#M311473</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a two reports generated through SAS. Let's say, the first report is of dt. 1st July 2016 and the second report is of today's date or any after 1st July. Both of them are having same columns except some updates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I want to create a report for today's date that will highlight all the new/old/changed&amp;nbsp;entries from the past report. The report should highlight what are the new entries (that should be highlighted as New) as well as if there are any changes in the existing observation from the old report then it should be highlighted as 'Changed'. And if the value is changed then the old value should be displayed in the next column of the report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;E.g. - If the old report is showing that the Emp number 20001 had sold 10 items and the new report is showing that he had sold 15 item then it should be&amp;nbsp;flagged as a 'Changed' and I want to highlight what was the old value for that instance if the value is changed, in the next column (See the sample table below). Same should be&amp;nbsp;displayed for every column&amp;nbsp;from the report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table A: (Dt. 1st July 2016)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Emp Number &amp;nbsp; &amp;nbsp;Items Sold &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Revenue&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;20001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 15 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$135&lt;/P&gt;&lt;P&gt;20002 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $99&lt;/P&gt;&lt;P&gt;20003 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;10 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$95&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tabel A : (Today's Report to be shown like)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Emp Number &amp;nbsp; &amp;nbsp;Items Sold &amp;nbsp; &amp;nbsp; Items Sold (as per old file) &amp;nbsp; &amp;nbsp; Revenue &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;Revenue (as per old file) &amp;nbsp; &amp;nbsp; &amp;nbsp;Flag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;20001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 15 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;15 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$135 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$135 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Old&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;20002 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $99 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Changed&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;20003 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 13 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;10 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $95 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$95 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Changed&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;20004 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;12 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; . &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $110 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; . &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; New &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My approach&amp;nbsp;is bit lengthy, I guess. What I do is :&lt;/P&gt;&lt;P&gt;1. I Run the Report as per today's input files and rename the variables by adding prefix&amp;nbsp;as 'New' (E.g. New_Items_Sold, etc.)&lt;/P&gt;&lt;P&gt;2. Import the old Report and r&lt;SPAN&gt;ename its variables by adding prefix&amp;nbsp;as 'Old' (E.g. Old_Items_Sold, etc.)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;3. check their values by using if conditions and if the values are not same then I flag it as 'Changed' and if new Emp Number found then I flagged it as 'New'&lt;/P&gt;&lt;P&gt;4. Then again export the report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any different approach that will reduce my time? Please share it if any.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Vikrant&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2016 18:11:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-Two-Reports-generated-through-SAS-and-highlighting-the/m-p/283856#M311473</guid>
      <dc:creator>VikrantSawatkar</dc:creator>
      <dc:date>2016-07-12T18:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Two Reports generated through SAS and highlighting the changes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Two-Reports-generated-through-SAS-and-highlighting-the/m-p/283877#M311472</link>
      <description>&lt;P&gt;As long as the results are not much more complicated than you show I would actually append the to data sets together insuring I have a variable to indicate which set is the source.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The using proc report have the column similar to items_sold,source revenue,source and then a computed column for flag that compares the values of pairs of the columns to yield same or different.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2016 19:42:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-Two-Reports-generated-through-SAS-and-highlighting-the/m-p/283877#M311472</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-07-12T19:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Same Reports of two different dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Two-Reports-generated-through-SAS-and-highlighting-the/m-p/283880#M311474</link>
      <description>&lt;P&gt;Append the two sets together adding a source variable to indicate which is the old and new data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use proc report with the variables and the source as sub-column&amp;nbsp; which looks like items_sold,source and similar.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Define a computed column for flag comparing the values of pairs of columns. Basically moving the If/then into the report procedure instead of in data sets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to do this with many different source files you'll end up spending a certain amount of time dealing with the column aliases in the compute block.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2016 19:49:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-Two-Reports-generated-through-SAS-and-highlighting-the/m-p/283880#M311474</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-07-12T19:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Same Reports of two different dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Two-Reports-generated-through-SAS-and-highlighting-the/m-p/284137#M311475</link>
      <description>&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But what if there are more than 10 reports having around 20-25 variables. And I have to implement the above said feature in it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 17:47:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-Two-Reports-generated-through-SAS-and-highlighting-the/m-p/284137#M311475</guid>
      <dc:creator>VikrantSawatkar</dc:creator>
      <dc:date>2016-07-13T17:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Two Reports generated through SAS and highlighting the changes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Two-Reports-generated-through-SAS-and-highlighting-the/m-p/284148#M311476</link>
      <description>Create a proper data mart data model that let you as flexible as possible create standard reports.</description>
      <pubDate>Wed, 13 Jul 2016 18:07:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-Two-Reports-generated-through-SAS-and-highlighting-the/m-p/284148#M311476</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-07-13T18:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Two Reports generated through SAS and highlighting the changes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Two-Reports-generated-through-SAS-and-highlighting-the/m-p/285293#M311477</link>
      <description>&lt;P&gt;Thank you very much for your help. I will try to implement it and will let you know once it is successfully implemented.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2016 16:57:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-Two-Reports-generated-through-SAS-and-highlighting-the/m-p/285293#M311477</guid>
      <dc:creator>VikrantSawatkar</dc:creator>
      <dc:date>2016-07-18T16:57:27Z</dc:date>
    </item>
  </channel>
</rss>

