<?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: Counting observations with a specific value in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/670006#M23249</link>
    <description>&lt;P&gt;Could you provide a sample data, please.&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jul 2020 22:06:16 GMT</pubDate>
    <dc:creator>Barkat</dc:creator>
    <dc:date>2020-07-16T22:06:16Z</dc:date>
    <item>
      <title>Counting observations with a specific value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/669982#M23238</link>
      <description>&lt;P&gt;Hi experts,&lt;/P&gt;
&lt;P&gt;I have a pretty basic question.&lt;/P&gt;
&lt;P&gt;I have a panel dataset, including weekly data on several firms. I have a variable "Week_Volume". I want to know for each firm (identifier variable:&amp;nbsp;brand_name) how many times (i.e., for how many weeks) "Week_Volume" equals zero.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please recommend an easy solution for this? Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 20:35:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/669982#M23238</guid>
      <dc:creator>AlG</dc:creator>
      <dc:date>2020-07-16T20:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: Counting observations with a specific value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/669985#M23239</link>
      <description>&lt;P&gt;Proc freq data=have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; where week_volume = 0;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; tables brandname;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assumes that you only have one week_volume value per week.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 20:38:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/669985#M23239</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-07-16T20:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: Counting observations with a specific value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/669990#M23241</link>
      <description>&lt;P&gt;You may want to try something as below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if &lt;SPAN&gt;Week_Volume1 &amp;nbsp;=0&amp;nbsp;&lt;/SPAN&gt;then do; count1=1; end;&lt;BR /&gt;if &lt;SPAN&gt;Week_Volume2 &amp;nbsp;=0&lt;/SPAN&gt;&amp;nbsp;then do; count2=1; end;&lt;BR /&gt;if &lt;SPAN&gt;Week_Volume3 &amp;nbsp;=0&lt;/SPAN&gt;&amp;nbsp;then do; count3=1; end;&lt;BR /&gt;if &lt;SPAN&gt;Week_Volume4 &amp;nbsp;=0&lt;/SPAN&gt;&amp;nbsp;then do; count4=1; end;&lt;BR /&gt;if &lt;SPAN&gt;Week_Volume5 &amp;nbsp;=0&lt;/SPAN&gt;&amp;nbsp;then do; count5=1; end;&lt;BR /&gt;if &lt;SPAN&gt;Week_Volume6 &amp;nbsp;=0&lt;/SPAN&gt;&amp;nbsp;then do; count6=1; end;&lt;BR /&gt;if &lt;SPAN&gt;Week_Volume7 &amp;nbsp;=0&lt;/SPAN&gt;&amp;nbsp;then do; count7=1; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;zero_vol_wk = sum (of &lt;SPAN&gt;count1 -&amp;nbsp;count7&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;drop&amp;nbsp;count1 -&amp;nbsp;count7;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 20:59:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/669990#M23241</guid>
      <dc:creator>Barkat</dc:creator>
      <dc:date>2020-07-16T20:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Counting observations with a specific value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/669991#M23242</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;Thanks. Based on what you said, I tried the following code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Proc freq data=Final;

   where Week_Volume = 0;

   tables brand_name;

run;&lt;/PRE&gt;
&lt;P&gt;I get the following error:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;657  Proc freq data=Final;
658
659     where Week_Volume = 0;
ERROR: WHERE clause operator requires compatible variables.
660
661     tables brand_name;
662
663  run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I thought maybe this is because the type of variable Week_Volume. So I ran this code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Final;                                                                                                                                                                                                                                                     
   y=vtype(Week_Volume);                                                                                                                         
   put y=;                                                                                                                                
run; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It says&amp;nbsp;Week_Volume=N&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 21:12:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/669991#M23242</guid>
      <dc:creator>AlG</dc:creator>
      <dc:date>2020-07-16T21:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: Counting observations with a specific value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/669992#M23243</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/335985"&gt;@Barkat&lt;/a&gt;&amp;nbsp;. However, I don't get your code.&lt;/P&gt;
&lt;P&gt;I have just one Week_Volume variable, but your code shows Week-Volume 1-7. I don't have such variables.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 21:15:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/669992#M23243</guid>
      <dc:creator>AlG</dc:creator>
      <dc:date>2020-07-16T21:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: Counting observations with a specific value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/669995#M23244</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/315691"&gt;@AlG&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;Thanks. Based on what you said, I tried the following code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Proc freq data=Final;

   where Week_Volume = 0;

   tables brand_name;

run;&lt;/PRE&gt;
&lt;P&gt;I get the following error:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;657  Proc freq data=Final;
658
659     where Week_Volume = 0;
ERROR: WHERE clause operator requires compatible variables.
660
661     tables brand_name;
662
663  run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I thought maybe this is because the type of variable Week_Volume. So I ran this code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Final;                                                                                                                                                                                                                                                     
   y=vtype(Week_Volume);                                                                                                                         
   put y=;                                                                                                                                
run; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It says&amp;nbsp;Week_Volume=N&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Try retyping the zero in the where clause. The forum seems to have changed a simple 0 to one with the slash when copy and pasted from the forum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 21:29:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/669995#M23244</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-07-16T21:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Counting observations with a specific value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/669996#M23245</link>
      <description>&lt;P&gt;My bad!&lt;/P&gt;&lt;P&gt;Never mind. I thought you have data from many weeks.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 21:34:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/669996#M23245</guid>
      <dc:creator>Barkat</dc:creator>
      <dc:date>2020-07-16T21:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: Counting observations with a specific value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/669997#M23246</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;I still get the same error...&lt;/P&gt;
&lt;P&gt;Could it be an issue with the variable&amp;nbsp;Week_Volume? However, I have no clue what may be wrong with it...&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 21:37:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/669997#M23246</guid>
      <dc:creator>AlG</dc:creator>
      <dc:date>2020-07-16T21:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: Counting observations with a specific value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/669999#M23247</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/335985"&gt;@Barkat&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do! I have 54 weeks for each firm, but just one column (week_volume), which indicates the volume of activity in a given week for a given firm.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 21:36:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/669999#M23247</guid>
      <dc:creator>AlG</dc:creator>
      <dc:date>2020-07-16T21:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: Counting observations with a specific value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/670005#M23248</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/335985"&gt;@Barkat&lt;/a&gt;&amp;nbsp;given no data was provided that's a fair assumption and a good example of why sample data is important. It also helps avoid issue with types and formats, since if you use the automated data set builders suggested it uses the correct formats/types applied.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 22:02:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/670005#M23248</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-07-16T22:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: Counting observations with a specific value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/670006#M23249</link>
      <description>&lt;P&gt;Could you provide a sample data, please.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 22:06:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/670006#M23249</guid>
      <dc:creator>Barkat</dc:creator>
      <dc:date>2020-07-16T22:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: Counting observations with a specific value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/670007#M23250</link>
      <description>&lt;P&gt;This doesn't make sense so there's something else going on that's not being shown.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please post the full code you ran and your full log.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's an example showing this should work correctly, if everything is as you specified.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data demo;
set sashelp.class;
if age in (13, 14, 11) then flag=1;
else flag=0;

x =vtype(flag);
put x;
run;

Proc freq data=demo;

   where flag = 0;

   tables name;

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/315691"&gt;@AlG&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;Thanks. Based on what you said, I tried the following code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Proc freq data=Final;

   where Week_Volume = 0;

   tables brand_name;

run;&lt;/PRE&gt;
&lt;P&gt;I get the following error:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;657  Proc freq data=Final;
658
659     where Week_Volume = 0;
ERROR: WHERE clause operator requires compatible variables.
660
661     tables brand_name;
662
663  run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I thought maybe this is because the type of variable Week_Volume. So I ran this code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Final;                                                                                                                                                                                                                                                     
   y=vtype(Week_Volume);                                                                                                                         
   put y=;                                                                                                                                
run; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It says&amp;nbsp;Week_Volume=N&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 22:06:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/670007#M23250</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-07-16T22:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: Counting observations with a specific value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/670012#M23251</link>
      <description>&lt;P&gt;Provide an example of the Final dataset you are using as data step code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;/&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pasting the generated code into a code box is important as the reformatting the message windows do can render data step code that will not run.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 22:21:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/670012#M23251</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-07-16T22:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Counting observations with a specific value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/670017#M23252</link>
      <description>&lt;P&gt;You may want to create a subset where wkvol=0. Then do proc means by brand name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;see below;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data hv;&lt;BR /&gt;infile datalines dsd dlm=',' ;&lt;BR /&gt;input name :$3. wkvol 5.;&lt;BR /&gt;datalines;&lt;BR /&gt;abc,0&lt;BR /&gt;def,023&lt;BR /&gt;pqr,125&lt;BR /&gt;xyz,200&lt;BR /&gt;jkl,0&lt;BR /&gt;jkl,0&lt;BR /&gt;jkl,280&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data hv1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; set hv;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; where wkvol=0;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc sort data=hv1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by name;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc means data =hv1 n;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;var wkvol;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by name;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 22:53:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/670017#M23252</guid>
      <dc:creator>Barkat</dc:creator>
      <dc:date>2020-07-16T22:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: Counting observations with a specific value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/670019#M23253</link>
      <description>&lt;P&gt;I tried to carefully follow the instructions provided on that page and here is what I got:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data WORK.FINAL;
  infile datalines dsd truncover;
  input brand_name:$10. Year0:BEST12. week:BEST12. Week_Volume:BEST12.;
  format Year0 BEST12. week BEST12. Week_Volume BEST12.;
datalines;
Absolut 2014 6 4
Absolut 2014 7 0
Absolut 2014 8 0
Absolut 2015 0 2
Absolut 2015 1 6
Absolut 2015 2 3
Aeromexico 2014 6 0
Aeromexico 2014 7 0
Aeromexico 2014 8 0
Aeromexico 2014 9 0
Aeromexico 2015 0 2
Aeromexico 2015 1 8
Aeromexico 2015 2 8
Air Canada 2014 6 29
Air Canada 2014 7 34
Air Canada 2014 8 25
Air Canada 2015 0 0
Air Canada 2015 1 25
Air Canada 2015 2 18
Air France 2014 6 4
Air France 2014 7 2
Air France 2014 8 5
Air France 2015 0 1
Air France 2015 1 3
Air France 2015 2 2
;;;;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Jul 2020 23:07:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/670019#M23253</guid>
      <dc:creator>AlG</dc:creator>
      <dc:date>2020-07-16T23:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: Counting observations with a specific value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/670020#M23254</link>
      <description>Here you go&lt;BR /&gt;&lt;BR /&gt;data FINAL;&lt;BR /&gt;infile datalines dsd dlm=" ";&lt;BR /&gt;input brand_name :$10. Year0 :4. week :2. Week_Volume :2.;&lt;BR /&gt;format Year0 4. week 2. Week_Volume 2.;&lt;BR /&gt;datalines;&lt;BR /&gt;Absolut 2014 6 4&lt;BR /&gt;Absolut 2014 7 0&lt;BR /&gt;Absolut 2014 8 0&lt;BR /&gt;Absolut 2015 0 2&lt;BR /&gt;Absolut 2015 1 6&lt;BR /&gt;Absolut 2015 2 3&lt;BR /&gt;Aeromexico 2014 6 0&lt;BR /&gt;Aeromexico 2014 7 0&lt;BR /&gt;Aeromexico 2014 8 0&lt;BR /&gt;Aeromexico 2014 9 0&lt;BR /&gt;Aeromexico 2015 0 2&lt;BR /&gt;Aeromexico 2015 1 8&lt;BR /&gt;Aeromexico 2015 2 8&lt;BR /&gt;Air Canada 2014 6 29&lt;BR /&gt;Air Canada 2014 7 34&lt;BR /&gt;Air Canada 2014 8 25&lt;BR /&gt;Air Canada 2015 0 0&lt;BR /&gt;Air Canada 2015 1 25&lt;BR /&gt;Air Canada 2015 2 18&lt;BR /&gt;Air France 2014 6 4&lt;BR /&gt;Air France 2014 7 2&lt;BR /&gt;Air France 2014 8 5&lt;BR /&gt;Air France 2015 0 1&lt;BR /&gt;Air France 2015 1 3&lt;BR /&gt;Air France 2015 2 2&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data final1; set final;&lt;BR /&gt;where Week_Volume=0;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc means data=final1 n; var Week_Volume; by brand_name; run;</description>
      <pubDate>Thu, 16 Jul 2020 23:32:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/670020#M23254</guid>
      <dc:creator>Barkat</dc:creator>
      <dc:date>2020-07-16T23:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Counting observations with a specific value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/670021#M23255</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/335985"&gt;@Barkat&lt;/a&gt;&amp;nbsp;I get the same error. It says:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;3641  data final1; set final;
3642  where Week_Volume=0;
ERROR: WHERE clause operator requires compatible variables.
3643  run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Jul 2020 23:38:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/670021#M23255</guid>
      <dc:creator>AlG</dc:creator>
      <dc:date>2020-07-16T23:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: Counting observations with a specific value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/670022#M23256</link>
      <description>I did not get any errors. Please restart your SAS and copy the whole thing from my answer and run.</description>
      <pubDate>Thu, 16 Jul 2020 23:43:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/670022#M23256</guid>
      <dc:creator>Barkat</dc:creator>
      <dc:date>2020-07-16T23:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: Counting observations with a specific value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/670023#M23257</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/335985"&gt;@Barkat&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I copy past your whole code it works.&lt;/P&gt;
&lt;P&gt;However, I am a bit confused here. This is just a small fraction of my dataset. My dataset has 27k rows and includes 110 different firms. So my question is when I import that dataset (using&amp;nbsp;proc import), what should I do next? Thanks again.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 23:49:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/670023#M23257</guid>
      <dc:creator>AlG</dc:creator>
      <dc:date>2020-07-16T23:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: Counting observations with a specific value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/670027#M23258</link>
      <description>&lt;P&gt;The following statement works as well. You will not need to create any subset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In your code replace &lt;EM&gt;truncover &lt;/EM&gt;with &lt;EM&gt;dlm=" "&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;You will not get any error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;proc freq data=final; where Week_Volume=0; table brand_name; run;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2020 00:09:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Counting-observations-with-a-specific-value/m-p/670027#M23258</guid>
      <dc:creator>Barkat</dc:creator>
      <dc:date>2020-07-17T00:09:00Z</dc:date>
    </item>
  </channel>
</rss>

