<?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: How do you enter a query to find errors within a dataset in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-do-you-enter-a-query-to-find-errors-within-a-dataset/m-p/840034#M36401</link>
    <description>&lt;P&gt;What is an error?&lt;BR /&gt;If you're looking for data quality measures, that's a much bigger bag of worms.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.lexjansen.com/mwsug/2010/stats/MWSUG-2010-182.pdf" target="_blank"&gt;https://www.lexjansen.com/mwsug/2010/stats/MWSUG-2010-182.pdf&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Oct 2022 21:28:05 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2022-10-21T21:28:05Z</dc:date>
    <item>
      <title>How do you enter a query to find errors within a dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-you-enter-a-query-to-find-errors-within-a-dataset/m-p/840031#M36399</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am requesting assistance on how to enter a query to find data that are flagged with errors within a dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 21:13:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-you-enter-a-query-to-find-errors-within-a-dataset/m-p/840031#M36399</guid>
      <dc:creator>ajackson</dc:creator>
      <dc:date>2022-10-21T21:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do you enter a query to find errors within a dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-you-enter-a-query-to-find-errors-within-a-dataset/m-p/840032#M36400</link>
      <description>&lt;P&gt;You need to explain what you mean by "data that are flagged with errors within a dataset". What would be an example?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 21:19:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-you-enter-a-query-to-find-errors-within-a-dataset/m-p/840032#M36400</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-10-21T21:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do you enter a query to find errors within a dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-you-enter-a-query-to-find-errors-within-a-dataset/m-p/840034#M36401</link>
      <description>&lt;P&gt;What is an error?&lt;BR /&gt;If you're looking for data quality measures, that's a much bigger bag of worms.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.lexjansen.com/mwsug/2010/stats/MWSUG-2010-182.pdf" target="_blank"&gt;https://www.lexjansen.com/mwsug/2010/stats/MWSUG-2010-182.pdf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 21:28:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-you-enter-a-query-to-find-errors-within-a-dataset/m-p/840034#M36401</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-10-21T21:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do you enter a query to find errors within a dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-you-enter-a-query-to-find-errors-within-a-dataset/m-p/840389#M36426</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to figure out the total count of errors by error flag and quarter in my dataset. Would this be an if/then statement that I use?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2022 21:10:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-you-enter-a-query-to-find-errors-within-a-dataset/m-p/840389#M36426</guid>
      <dc:creator>ajackson</dc:creator>
      <dc:date>2022-10-24T21:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do you enter a query to find errors within a dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-you-enter-a-query-to-find-errors-within-a-dataset/m-p/840393#M36427</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/436501"&gt;@ajackson&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to figure out the total count of errors by error flag and quarter in my dataset. Would this be an if/then statement that I use?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Sound like you just want to run PROC FREQ.&lt;/P&gt;
&lt;P&gt;So assuming you have a error flag variable name ERROR_FLAG and a variable named DATE that has date values you could probably just use the YYQ format to group by quarter.&amp;nbsp; So just do something like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=mydata ;
  tables date * error_flag;
  format date yyq6.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If there are a lot more distinct values of ERROR_FLAG than there are quarters you might want to reverse the two variables in the TABLES statement.&amp;nbsp; Or perhaps add the /LIST option to the TABLES statement.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2022 21:18:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-you-enter-a-query-to-find-errors-within-a-dataset/m-p/840393#M36427</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-10-24T21:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do you enter a query to find errors within a dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-you-enter-a-query-to-find-errors-within-a-dataset/m-p/840396#M36429</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/436501"&gt;@ajackson&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to figure out the total count of errors by error flag and quarter in my dataset. Would this be an if/then statement that I use?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Depends a bit on your data structure.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assuming you have something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%" height="30px"&gt;Date&lt;/TD&gt;
&lt;TD width="50%" height="30px"&gt;Error_Flag&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="30px"&gt;2022-10-23&lt;/TD&gt;
&lt;TD width="50%" height="30px"&gt;Error Type 1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="30px"&gt;2022-10-24&lt;/TD&gt;
&lt;TD width="50%" height="30px"&gt;Error Type 3&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you can do something like this to get the results by quarter:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=have; *have is the input data set;
table date*error_flag / list out=want;
format date yyq6.; *controls what level the errors are aggregated at;
*for monthly summary use yymmn6.;
run;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The results will be displayed and saved in a data set named want.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2022 21:19:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-you-enter-a-query-to-find-errors-within-a-dataset/m-p/840396#M36429</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-10-24T21:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do you enter a query to find errors within a dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-you-enter-a-query-to-find-errors-within-a-dataset/m-p/840941#M36448</link>
      <description>&lt;P&gt;Great. Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 15:36:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-you-enter-a-query-to-find-errors-within-a-dataset/m-p/840941#M36448</guid>
      <dc:creator>ajackson</dc:creator>
      <dc:date>2022-10-26T15:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do you enter a query to find errors within a dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-you-enter-a-query-to-find-errors-within-a-dataset/m-p/840942#M36449</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 15:37:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-you-enter-a-query-to-find-errors-within-a-dataset/m-p/840942#M36449</guid>
      <dc:creator>ajackson</dc:creator>
      <dc:date>2022-10-26T15:37:02Z</dc:date>
    </item>
  </channel>
</rss>

