<?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 in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/773664#M15415</link>
    <description>1 means completed.&lt;BR /&gt;</description>
    <pubDate>Tue, 12 Oct 2021 14:52:48 GMT</pubDate>
    <dc:creator>sas_it</dc:creator>
    <dc:date>2021-10-12T14:52:48Z</dc:date>
    <item>
      <title>Count</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/773612#M15406</link>
      <description>&lt;P&gt;I am having variables stage wise. For example stage 1, stage2 and stage 3. It consist of values 0 and 1. If we assume for 10 applicants then how to count the no. of applicants in stage 1, like wise stage 2 and 3. Want to show each stage count.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Appli no&amp;nbsp; stage1 stage2 stage3&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;
&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;/P&gt;
&lt;P&gt;3&lt;/P&gt;
&lt;P&gt;4&lt;/P&gt;
&lt;P&gt;5&lt;/P&gt;
&lt;P&gt;6&lt;/P&gt;
&lt;P&gt;7&lt;/P&gt;
&lt;P&gt;8&lt;/P&gt;
&lt;P&gt;9&lt;/P&gt;
&lt;P&gt;10&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have done :&lt;/P&gt;
&lt;P&gt;if stage1&amp;gt;0 then&lt;/P&gt;
&lt;P&gt;return 1&lt;/P&gt;
&lt;P&gt;else return 0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 12:21:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/773612#M15406</guid>
      <dc:creator>sas_it</dc:creator>
      <dc:date>2021-10-12T12:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: Count</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/773626#M15407</link>
      <description>&lt;P&gt;What output are you expecting from your code?&lt;/P&gt;
&lt;P&gt;What do you mean by "return 1" ? - is it per row or per the whole data?&lt;/P&gt;
&lt;P&gt;what variable should hold the result?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 12:46:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/773626#M15407</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2021-10-12T12:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: Count</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/773636#M15408</link>
      <description>&lt;P&gt;Providing a SAS data step creating the full sample data and showing the desired result would help.&lt;/P&gt;
&lt;P&gt;Proc Summary might be what you're really after but given your a bit underspecified question here one way to go.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  input Appli_no stage1 stage2 stage3;
datalines;
1 0 1 1
2 1 0 0
3 0 0 1
;

data want;
  set have end=last;
  retain s1 s2 s3;
  s1+stage1;
  s2+stage2;
  s3+stage3;
  if last then output;
  keep s1 s2 s3;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_0-1634045095509.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64604i389D6A859A1E67C8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Patrick_0-1634045095509.png" alt="Patrick_0-1634045095509.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 13:25:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/773636#M15408</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-10-12T13:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: Count</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/773638#M15409</link>
      <description>I want the total count of each stage and I will be creatiNg the hierarchy of the stages.</description>
      <pubDate>Tue, 12 Oct 2021 13:25:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/773638#M15409</guid>
      <dc:creator>sas_it</dc:creator>
      <dc:date>2021-10-12T13:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: Count</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/773644#M15410</link>
      <description>&lt;P&gt;Alternative to&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt;'s solution you can use &lt;STRONG&gt;proc summary&amp;nbsp;&lt;/STRONG&gt; or proc means and some other procedures:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=have &amp;lt;missing noprint&amp;gt;; * the last are optional;
   class appli_no;  /* or just class; for final total */
   var stage1-stage3;
   output out=result sum=;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Oct 2021 13:34:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/773644#M15410</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2021-10-12T13:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: Count</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/773656#M15412</link>
      <description>Can we directly in VA?</description>
      <pubDate>Tue, 12 Oct 2021 13:54:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/773656#M15412</guid>
      <dc:creator>sas_it</dc:creator>
      <dc:date>2021-10-12T13:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: Count</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/773661#M15413</link>
      <description>Can we directly in VA?  I want to create hierarchy and having different stages data and custom category of the stages also. Each stage having the values 0 and 1. But I want to take only one which signifies completed.</description>
      <pubDate>Tue, 12 Oct 2021 14:13:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/773661#M15413</guid>
      <dc:creator>sas_it</dc:creator>
      <dc:date>2021-10-12T14:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Count</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/773663#M15414</link>
      <description>&lt;P&gt;I don't know all in's and out's of VA, but sponanously I think your data should be restructured so it can handle more dynamic requets.&lt;/P&gt;
&lt;P&gt;a tronspose so you'll have:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Appli_no Stage 
1             2
1             3
2             1      

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I see no immediately need to fill in stages with 0, but that depends what a 0 means in your original data. If you need it just an extra columns with 0/1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Oct 2021 08:07:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/773663#M15414</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2021-10-15T08:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: Count</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/773664#M15415</link>
      <description>1 means completed.&lt;BR /&gt;</description>
      <pubDate>Tue, 12 Oct 2021 14:52:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/773664#M15415</guid>
      <dc:creator>sas_it</dc:creator>
      <dc:date>2021-10-12T14:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: Count</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/773883#M15422</link>
      <description>&lt;P&gt;For sure.&lt;/P&gt;
&lt;P&gt;add a dummy variable, like scope="all".&lt;/P&gt;
&lt;P&gt;then use stageX variables as numeric variables with sum as aggregation.&lt;/P&gt;
&lt;P&gt;have a list item with the scope variable and the stageX variables.&lt;/P&gt;
&lt;P&gt;this should work for you.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 11:03:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/773883#M15422</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2021-10-13T11:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: Count</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/773887#M15424</link>
      <description>I am already haviNg stages variables in numeric. But when I convert that to category to create hierarchy , does it effect result or count..&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Oct 2021 11:12:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/773887#M15424</guid>
      <dc:creator>sas_it</dc:creator>
      <dc:date>2021-10-13T11:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: Count</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/774437#M15451</link>
      <description>But what does 0 mean?&lt;BR /&gt;Have been enrolled and not completed, or perhaps not even enrolled?</description>
      <pubDate>Fri, 15 Oct 2021 08:09:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/774437#M15451</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2021-10-15T08:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: Count</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/774469#M15452</link>
      <description>Actually I just want the count of 1 which means completed. 0 means not completed but I don't want that.</description>
      <pubDate>Fri, 15 Oct 2021 11:19:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/774469#M15452</guid>
      <dc:creator>sas_it</dc:creator>
      <dc:date>2021-10-15T11:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: Count</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/774537#M15455</link>
      <description>One way could be to have three different objects, one for each stage. The objects show the sum of stage1, stage2 and stage3.&lt;BR /&gt;You can add labels and text to each object to tell what stage is shown.&lt;BR /&gt;I don't really understand why you need to create a hierarchy, could it not be done just graphically?&lt;BR /&gt;&lt;BR /&gt;//Fredrik</description>
      <pubDate>Fri, 15 Oct 2021 15:23:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/774537#M15455</guid>
      <dc:creator>FredrikE</dc:creator>
      <dc:date>2021-10-15T15:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: Count</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/774567#M15456</link>
      <description>Thank you so much.</description>
      <pubDate>Fri, 15 Oct 2021 16:34:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/774567#M15456</guid>
      <dc:creator>sas_it</dc:creator>
      <dc:date>2021-10-15T16:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: Count</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/774569#M15457</link>
      <description>I need total count of the variable.</description>
      <pubDate>Fri, 15 Oct 2021 16:35:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count/m-p/774569#M15457</guid>
      <dc:creator>sas_it</dc:creator>
      <dc:date>2021-10-15T16:35:47Z</dc:date>
    </item>
  </channel>
</rss>

