<?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: Count function in SAS VA in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-function-in-SAS-VA/m-p/432519#M9281</link>
    <description>&lt;P&gt;Thanks for the reply. Tried it &amp;amp; still getting some error. Can you give some example or something that is done previously.&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jan 2018 21:31:25 GMT</pubDate>
    <dc:creator>sashokku</dc:creator>
    <dc:date>2018-01-30T21:31:25Z</dc:date>
    <item>
      <title>Count function in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-function-in-SAS-VA/m-p/432487#M9275</link>
      <description>&lt;P&gt;Am a new SAS VA user. I need to write function like this can you help me out. These are the measures, I need to create.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Count (A =' Yes')&lt;BR /&gt;Column A has two distinct values in it. I need to know the count of 'Yes' and use it as a Measure in chart.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Count( A &amp;lt;1 ) AND Count ( B &amp;lt; 1 )&lt;/P&gt;&lt;P&gt;How to write a condition like this &amp;amp; keep it as a measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 20:40:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-function-in-SAS-VA/m-p/432487#M9275</guid>
      <dc:creator>sashokku</dc:creator>
      <dc:date>2018-01-30T20:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: Count function in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-function-in-SAS-VA/m-p/432495#M9276</link>
      <description>&lt;P&gt;Create a calculated measure or variable first that's 1 if A is yes, 0 otherwise.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then sum that variable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 20:59:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-function-in-SAS-VA/m-p/432495#M9276</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-30T20:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: Count function in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-function-in-SAS-VA/m-p/432505#M9278</link>
      <description>&lt;P&gt;Count is an aggregated measure so all you need to do is in the Data Pane click the down arrow and select New Aggregated Measure. In this window you can define formulas to do what you want.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 21:11:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-function-in-SAS-VA/m-p/432505#M9278</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-01-30T21:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: Count function in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-function-in-SAS-VA/m-p/432519#M9281</link>
      <description>&lt;P&gt;Thanks for the reply. Tried it &amp;amp; still getting some error. Can you give some example or something that is done previously.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 21:31:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-function-in-SAS-VA/m-p/432519#M9281</guid>
      <dc:creator>sashokku</dc:creator>
      <dc:date>2018-01-30T21:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Count function in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-function-in-SAS-VA/m-p/432555#M9284</link>
      <description>&lt;P&gt;Thanks for the reply&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;. Yes, I did it already but getting error within that. Since I am unable to write conditions within that. I can share the snapshot of it for clarity.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to write condition &amp;amp; then get the count of it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Count( A ='Yes' )&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 22:48:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-function-in-SAS-VA/m-p/432555#M9284</guid>
      <dc:creator>sashokku</dc:creator>
      <dc:date>2018-01-30T22:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Count function in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-function-in-SAS-VA/m-p/432835#M9292</link>
      <description>&lt;P&gt;Hello sashokku,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to create a calculated measure like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IF ( 'A'n = 'yes' )&lt;BR /&gt;RETURN 1&lt;BR /&gt;ELSE 0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The sum of that measure is what you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your second condition can also be evaluated with IF statements:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IF ( ( 'A'n &amp;lt; 1 ) AND ( 'B'n &amp;lt; 1 ) )&lt;/P&gt;
&lt;P&gt;RETURN 1&lt;BR /&gt;ELSE 0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;About the Count() function, it returns the number of nonmissing values for a measure. So if your IF statements return missing instead of 0 you could use count. But it is simpler to just use sum with the expressions above.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps,&lt;/P&gt;
&lt;P&gt;Sam&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2018 16:58:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-function-in-SAS-VA/m-p/432835#M9292</guid>
      <dc:creator>Sam_SAS</dc:creator>
      <dc:date>2018-01-31T16:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: Count function in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-function-in-SAS-VA/m-p/773691#M15417</link>
      <description>I am having 5 stages with 0 and 1 as follow :&lt;BR /&gt;Application id. S1 s2 s3 s4 s5&lt;BR /&gt;1.                         0.  1.  1.  0.   1&lt;BR /&gt;2.                           1.  0.  1.  0.   1&lt;BR /&gt;&lt;BR /&gt;Support we have 10 applications and i want the total of each stage . Will the solution provided by you will work for this.&lt;BR /&gt;</description>
      <pubDate>Tue, 12 Oct 2021 17:13:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-function-in-SAS-VA/m-p/773691#M15417</guid>
      <dc:creator>sas_it</dc:creator>
      <dc:date>2021-10-12T17:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: Count function in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-function-in-SAS-VA/m-p/773698#M15418</link>
      <description>If the stages are numeric (not 1 and 0 as character values), then the totals for the table should provide the correct total values. Yes? Also, any aggregated object will default to showing the sum of the stage values. I believe that should be what you want, too.&lt;BR /&gt;&lt;BR /&gt;It should not be necessary to use any calculated expressions to get the values you want.</description>
      <pubDate>Tue, 12 Oct 2021 17:34:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-function-in-SAS-VA/m-p/773698#M15418</guid>
      <dc:creator>Sam_SAS</dc:creator>
      <dc:date>2021-10-12T17:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Count function in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-function-in-SAS-VA/m-p/774175#M15435</link>
      <description>&lt;P&gt;How to do this?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 10:53:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-function-in-SAS-VA/m-p/774175#M15435</guid>
      <dc:creator>sas_it</dc:creator>
      <dc:date>2021-10-14T10:53:53Z</dc:date>
    </item>
  </channel>
</rss>

