<?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 of the stages and creating hierarchy and custom categories in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-of-the-stages-and-creating-hierarchy-and-custom-categories/m-p/774240#M15440</link>
    <description>&lt;P&gt;Does it have to be a hierarchy?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What about a button bar that would enable the user to select the stage?&lt;/P&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="vac2.gif" style="width: 537px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64704i5E55027E99796108/image-size/large?v=v2&amp;amp;px=999" role="button" title="vac2.gif" alt="vac2.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In this example, the "Completed" measure will show the total for the column that is selected in the button bar.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It takes a bit of work to implement this kind of selector, but I can show you how if this would meet your needs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sam&lt;/P&gt;</description>
    <pubDate>Thu, 14 Oct 2021 14:38:19 GMT</pubDate>
    <dc:creator>Sam_SAS</dc:creator>
    <dc:date>2021-10-14T14:38:19Z</dc:date>
    <item>
      <title>Count of the stages and creating hierarchy and custom categories</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-of-the-stages-and-creating-hierarchy-and-custom-categories/m-p/773806#M15419</link>
      <description>&lt;P&gt;Please find the attached requirement and pls help its urgent.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 02:08:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-of-the-stages-and-creating-hierarchy-and-custom-categories/m-p/773806#M15419</guid>
      <dc:creator>sas_it</dc:creator>
      <dc:date>2021-10-13T02:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: Count of the stages and creating hierarchy and custom categories</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-of-the-stages-and-creating-hierarchy-and-custom-categories/m-p/773925#M15430</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd like to help, but it is difficult to understand exactly what you want to do. Your requirements document doesn't quite match the sample data provided.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you make a hierarchy of Division &amp;gt; District, you can get a crosstab with totals like this:&lt;/P&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="vac.gif" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64655i88942F7DFD1F1602/image-size/large?v=v2&amp;amp;px=999" role="button" title="vac.gif" alt="vac.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want the zeroes to be missing values, you can create calculated measures like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IF ( 'AS Completed'n = 0 )&lt;BR /&gt;RETURN .&lt;BR /&gt;ELSE 'AS Completed'n&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want a different kind of result, please try to create an example of how it should look in Excel or another tool.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Sam&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 13:37:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-of-the-stages-and-creating-hierarchy-and-custom-categories/m-p/773925#M15430</guid>
      <dc:creator>Sam_SAS</dc:creator>
      <dc:date>2021-10-13T13:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Count of the stages and creating hierarchy and custom categories</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-of-the-stages-and-creating-hierarchy-and-custom-categories/m-p/774172#M15434</link>
      <description>&lt;P&gt;I want total value of the variable to be displayed. But for me it displays 0 and 1 in filter. Instead I just want total.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Eg.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;D completed&lt;/P&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;P&gt;-----&lt;/P&gt;
&lt;P&gt;2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So it should come 2 instead of 0 and 1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 10:38:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-of-the-stages-and-creating-hierarchy-and-custom-categories/m-p/774172#M15434</guid>
      <dc:creator>sas_it</dc:creator>
      <dc:date>2021-10-14T10:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Count of the stages and creating hierarchy and custom categories</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-of-the-stages-and-creating-hierarchy-and-custom-categories/m-p/774208#M15438</link>
      <description>&lt;P&gt;It still is not clear what you want. In which type of visualization do you want to see the totals? In a list table? In a crosstab?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the values (0, 1, 0, 1) are giving you 1, check to see if the aggregation for this measure is something other than Sum.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 13:12:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-of-the-stages-and-creating-hierarchy-and-custom-categories/m-p/774208#M15438</guid>
      <dc:creator>Sam_SAS</dc:creator>
      <dc:date>2021-10-14T13:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: Count of the stages and creating hierarchy and custom categories</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-of-the-stages-and-creating-hierarchy-and-custom-categories/m-p/774212#M15439</link>
      <description>Actually I want this variable total value(value of 1) in various objects like bar chart, pie chart as a hierarchy . Eg stage 1, stage 2, stage 3 etc. When I click on stage one , it shows 0 and 1 both which again I need to filter. But just i want total value.</description>
      <pubDate>Thu, 14 Oct 2021 13:30:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-of-the-stages-and-creating-hierarchy-and-custom-categories/m-p/774212#M15439</guid>
      <dc:creator>sas_it</dc:creator>
      <dc:date>2021-10-14T13:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: Count of the stages and creating hierarchy and custom categories</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-of-the-stages-and-creating-hierarchy-and-custom-categories/m-p/774240#M15440</link>
      <description>&lt;P&gt;Does it have to be a hierarchy?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What about a button bar that would enable the user to select the stage?&lt;/P&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="vac2.gif" style="width: 537px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64704i5E55027E99796108/image-size/large?v=v2&amp;amp;px=999" role="button" title="vac2.gif" alt="vac2.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In this example, the "Completed" measure will show the total for the column that is selected in the button bar.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It takes a bit of work to implement this kind of selector, but I can show you how if this would meet your needs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sam&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 14:38:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-of-the-stages-and-creating-hierarchy-and-custom-categories/m-p/774240#M15440</guid>
      <dc:creator>Sam_SAS</dc:creator>
      <dc:date>2021-10-14T14:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: Count of the stages and creating hierarchy and custom categories</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-of-the-stages-and-creating-hierarchy-and-custom-categories/m-p/774242#M15441</link>
      <description>Yes pls show me step by step completely.</description>
      <pubDate>Thu, 14 Oct 2021 14:43:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-of-the-stages-and-creating-hierarchy-and-custom-categories/m-p/774242#M15441</guid>
      <dc:creator>sas_it</dc:creator>
      <dc:date>2021-10-14T14:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: Count of the stages and creating hierarchy and custom categories</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-of-the-stages-and-creating-hierarchy-and-custom-categories/m-p/774251#M15442</link>
      <description>&lt;P&gt;The selector I used is kind of a hack, but I'm not sure if there's a better way to do it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For a button bar control, you need a column that has the values for the button labels. It doesn't really matter which rows off the table these values are in.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To create the label column, let's make a custom category:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;On the Data pane, select &lt;STRONG&gt;New data item &amp;gt; Custom category&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;I'll base the category on the values of ApplicationID, which are probably unique. (I first converted ApplicationID from a measure to a category)&lt;/LI&gt;
&lt;LI&gt;Create a value group for all the labels but one, and drag at least one value of ApplicationID into each group&lt;/LI&gt;
&lt;LI&gt;To handle all the remaining values, I will group them as the last label.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;So your Custom Category window should look like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vac3.gif" style="width: 913px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64706i7E1662D046CC51C9/image-size/large?v=v2&amp;amp;px=999" role="button" title="vac3.gif" alt="vac3.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The button bar will set the value of a parameter, so let's create that parameter now.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;On the Data pane, select &lt;STRONG&gt;New data item &amp;gt; Parameter&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;The default settings will be fine. Click OK to make the parameter.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, we need to create the "Completed" calculated item.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;On the Data pane, select &lt;STRONG&gt;New data item &amp;gt; Calculated item&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Use an expression with nested IF statements to get the value of the column that matches the parameter value:&lt;/LI&gt;
&lt;/OL&gt;
&lt;PRE&gt;IF ( 'Parameter 1'p = 'ASCompleted' )
RETURN 'AS Completed'n
ELSE (
IF ( 'Parameter 1'p = 'DSCompleted' )
RETURN 'D sCompleted'n
ELSE (
IF ( 'Parameter 1'p = 'FSCompleted' )
RETURN 'FSCompleted'n
ELSE 'PSCompleted'n ) )&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, we put it all together:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;In the body of the report page, make a button bar control. The control must NOT be placed in the page prompt area, because then it would filter your data. We only want the control to set the value of our parameter.&lt;/LI&gt;
&lt;LI&gt;On the Roles pane for the button bar, assign the custom category to the Category role and assign the parameter to the Parameter role.&lt;/LI&gt;
&lt;LI&gt;On the same page, add the bar chart and any other visualizations that will be affected by the button bar. Use the calculated item as the Measure role for these visualizations.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Now you should be able to select the button bar and see the values in your visualizations change. In the sample data you provided, the first two Completed columns have the same total but the other two should show a change when you select them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One of the limitations of this approach is that report filters might hide some of your button label values. A workaround to that is to make your label column by using a calculated expression using the endsWith() operator to set all the rows where ApplicationID ends in 1 to one label, ApplicationID ends in 2 to another label, and so on. You don't have to worry about this if you don't have report-level filters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is all a bit tricky and it would be easier if your data had a different structure. But that is not always something we can control.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know if there is more I can help with,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sam&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 15:19:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-of-the-stages-and-creating-hierarchy-and-custom-categories/m-p/774251#M15442</guid>
      <dc:creator>Sam_SAS</dc:creator>
      <dc:date>2021-10-14T15:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: Count of the stages and creating hierarchy and custom categories</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-of-the-stages-and-creating-hierarchy-and-custom-categories/m-p/774283#M15443</link>
      <description>Thank you so much for your help but if I take application id as value for stages, the result may differ..&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Oct 2021 16:37:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-of-the-stages-and-creating-hierarchy-and-custom-categories/m-p/774283#M15443</guid>
      <dc:creator>sas_it</dc:creator>
      <dc:date>2021-10-14T16:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Count of the stages and creating hierarchy and custom categories</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-of-the-stages-and-creating-hierarchy-and-custom-categories/m-p/774296#M15444</link>
      <description>If you can edit the data source, you can generate a different column to use as the basis for the button labels.</description>
      <pubDate>Thu, 14 Oct 2021 17:00:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-of-the-stages-and-creating-hierarchy-and-custom-categories/m-p/774296#M15444</guid>
      <dc:creator>Sam_SAS</dc:creator>
      <dc:date>2021-10-14T17:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: Count of the stages and creating hierarchy and custom categories</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-of-the-stages-and-creating-hierarchy-and-custom-categories/m-p/774298#M15445</link>
      <description>Yes we can edit using EG tool. If I create the calculated data item as character and check if ds=1 then completed else missing. Is tHis the correct way?</description>
      <pubDate>Thu, 14 Oct 2021 17:12:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-of-the-stages-and-creating-hierarchy-and-custom-categories/m-p/774298#M15445</guid>
      <dc:creator>sas_it</dc:creator>
      <dc:date>2021-10-14T17:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Count of the stages and creating hierarchy and custom categories</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-of-the-stages-and-creating-hierarchy-and-custom-categories/m-p/774301#M15446</link>
      <description>&lt;P&gt;If you make it character, the values cannot be aggregated (1+0+0+1+1 = 3). If you want to have the totals, the values must be numeric.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 17:51:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Count-of-the-stages-and-creating-hierarchy-and-custom-categories/m-p/774301#M15446</guid>
      <dc:creator>Sam_SAS</dc:creator>
      <dc:date>2021-10-14T17:51:53Z</dc:date>
    </item>
  </channel>
</rss>

