<?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: SAS drop down selection and aggregation in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-drop-down-selection-and-aggregation/m-p/739489#M14881</link>
    <description>&lt;P&gt;So with that change and using a drop-down control we get 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="communitytableno1.gif" style="width: 366px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/59104i57438AD48D3DDF66/image-size/large?v=v2&amp;amp;px=999" role="button" title="communitytableno1.gif" alt="communitytableno1.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="communitytablelow1.gif" style="width: 380px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/59103i80106C4BC00F3D9C/image-size/large?v=v2&amp;amp;px=999" role="button" title="communitytablelow1.gif" alt="communitytablelow1.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="communitytablehigh1.gif" style="width: 365px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/59105i1EE75A456F6AFAB2/image-size/large?v=v2&amp;amp;px=999" role="button" title="communitytablehigh1.gif" alt="communitytablehigh1.gif" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 06 May 2021 13:59:26 GMT</pubDate>
    <dc:creator>Sam_SAS</dc:creator>
    <dc:date>2021-05-06T13:59:26Z</dc:date>
    <item>
      <title>SAS drop down selection and aggregation</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-drop-down-selection-and-aggregation/m-p/739283#M14870</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I have the input table:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;Low Level&lt;/TD&gt;&lt;TD&gt;High Level&lt;/TD&gt;&lt;TD&gt;Cost&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;23&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;23&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;42&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;42&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;&lt;BR /&gt;meaning that an ID can be in both Level.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;What I would like to do is to have a drop down selection for Level.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I select Low Level. Only low level average cost display (average cost = (23 + 42 + 12) / 3 =25.7, and there are 3 unique IDs&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Only Low Level&lt;/P&gt;&lt;P&gt;(Low Level = 1 and High Level = 0)&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Average Cost&lt;/TD&gt;&lt;TD&gt;Number of ID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;25,7&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I select High Level. Only high level average cost display (average cost = (23 + 42) / 2 =32.5, and there are 2 unique IDs&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Only High Level&lt;/P&gt;&lt;P&gt;(Low Level = 0&amp;nbsp; and High Level =1)&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Average Cost&lt;/TD&gt;&lt;TD&gt;Number of ID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;32,5&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As default (no selection), it will take into account all level with unique ID.&amp;nbsp;(average cost = (23 + 42 +12 + 5) / 2 =20.5, and all unique IDs are counted.&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;All (Unique ID)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Average Cost&lt;/TD&gt;&lt;TD&gt;Number of ID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20,5&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can we do that for this drop down aggregation?&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2021 17:26:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-drop-down-selection-and-aggregation/m-p/739283#M14870</guid>
      <dc:creator>vietlinh12hoa</dc:creator>
      <dc:date>2021-05-05T17:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: SAS drop down selection and aggregation</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-drop-down-selection-and-aggregation/m-p/739317#M14871</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would it make sense to create a calculated column "Level" with an expression like this?&lt;/P&gt;
&lt;PRE&gt;IF ( ( 'High Level'n = 1 ) AND ( 'Low Level'n = 0 ) )&lt;BR /&gt;RETURN 'High Level'&lt;BR /&gt;ELSE (&lt;BR /&gt;IF ( ( 'Low Level'n = 1) AND ( 'High Level'n = 0 ) )&lt;BR /&gt;RETURN 'Low Level'&lt;BR /&gt;ELSE 'Neither' )&lt;/PRE&gt;
&lt;P&gt;Then you could assign this Level column to a button bar control.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think that would achieve the result that you are looking for. An extra clause might be needed to handle a "Both" case where both values are 1. I don't know if that is possible in your data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let us know if that helps,&lt;/P&gt;
&lt;P&gt;Sam&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2021 19:18:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-drop-down-selection-and-aggregation/m-p/739317#M14871</guid>
      <dc:creator>Sam_SAS</dc:creator>
      <dc:date>2021-05-05T19:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: SAS drop down selection and aggregation</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-drop-down-selection-and-aggregation/m-p/739318#M14872</link>
      <description>&lt;P&gt;Thanks for the answers. Ideally, an ID can't be either High or Low. So you mean now we have 4 drop down selection for Level Column ('HIgh', 'Low', 'Neither', ' ' ) (Empty blank for all).&lt;/P&gt;&lt;P&gt;But I wonder the rule for aggregation in VIYA will be a little bit different when when no selection (All is considered).&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2021 19:27:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-drop-down-selection-and-aggregation/m-p/739318#M14872</guid>
      <dc:creator>vietlinh12hoa</dc:creator>
      <dc:date>2021-05-05T19:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: SAS drop down selection and aggregation</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-drop-down-selection-and-aggregation/m-p/739325#M14873</link>
      <description>I think that the expression I gave above should work. You will have a button bar like this:&lt;BR /&gt;&lt;BR /&gt;[[High Level] [Low Level] [Neither]]&lt;BR /&gt;&lt;BR /&gt;If the user does not make a selection on the button bar, then all values of the column will be displayed. There is no need for an additional "All" value in the calculated column.&lt;BR /&gt;&lt;BR /&gt;Sam</description>
      <pubDate>Wed, 05 May 2021 19:37:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-drop-down-selection-and-aggregation/m-p/739325#M14873</guid>
      <dc:creator>Sam_SAS</dc:creator>
      <dc:date>2021-05-05T19:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: SAS drop down selection and aggregation</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-drop-down-selection-and-aggregation/m-p/739355#M14877</link>
      <description>I see. but when there is no selection, the table should only display unique values, as seen in the last table only 4 unique IDs are aggregated.</description>
      <pubDate>Wed, 05 May 2021 21:41:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-drop-down-selection-and-aggregation/m-p/739355#M14877</guid>
      <dc:creator>vietlinh12hoa</dc:creator>
      <dc:date>2021-05-05T21:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: SAS drop down selection and aggregation</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-drop-down-selection-and-aggregation/m-p/739481#M14879</link>
      <description>&lt;P&gt;I am getting this output using your data:&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="communitytablelow.gif" style="width: 383px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/59100i1CB8E20843EB74A4/image-size/large?v=v2&amp;amp;px=999" role="button" title="communitytablelow.gif" alt="communitytablelow.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="communitytablehigh.gif" style="width: 385px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/59101i900A097C16BC38ED/image-size/large?v=v2&amp;amp;px=999" role="button" title="communitytablehigh.gif" alt="communitytablehigh.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="communitytablenoselectoin.gif" style="width: 386px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/59102i134B68AAEBAF18D8/image-size/large?v=v2&amp;amp;px=999" role="button" title="communitytablenoselectoin.gif" alt="communitytablenoselectoin.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I calculated the distinct count for ID. To eliminate "Neither" from the button bar, I just created a filter on the button bar to remove that value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Cost value when nothing is selected is the average for the full data set, rather than the average of the averages for the ID. I believe there is a workaround for this if you want the value to be aggregated that way, but I don't remember how to do it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also use a drop-down list control instead of a button bar. When there are only two selections, I like button bars.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this closer to what you wanted?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Sam&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 13:51:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-drop-down-selection-and-aggregation/m-p/739481#M14879</guid>
      <dc:creator>Sam_SAS</dc:creator>
      <dc:date>2021-05-06T13:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAS drop down selection and aggregation</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-drop-down-selection-and-aggregation/m-p/739484#M14880</link>
      <description>&lt;P&gt;Replacing Cost with this calculation will give you 20.5:&lt;BR /&gt;&lt;BR /&gt;AggregateTable(_Avg_, Table(_Avg_, Fixed('ID'n), 'Cost'n))&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 13:56:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-drop-down-selection-and-aggregation/m-p/739484#M14880</guid>
      <dc:creator>Sam_SAS</dc:creator>
      <dc:date>2021-05-06T13:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: SAS drop down selection and aggregation</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-drop-down-selection-and-aggregation/m-p/739489#M14881</link>
      <description>&lt;P&gt;So with that change and using a drop-down control we get 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="communitytableno1.gif" style="width: 366px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/59104i57438AD48D3DDF66/image-size/large?v=v2&amp;amp;px=999" role="button" title="communitytableno1.gif" alt="communitytableno1.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="communitytablelow1.gif" style="width: 380px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/59103i80106C4BC00F3D9C/image-size/large?v=v2&amp;amp;px=999" role="button" title="communitytablelow1.gif" alt="communitytablelow1.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="communitytablehigh1.gif" style="width: 365px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/59105i1EE75A456F6AFAB2/image-size/large?v=v2&amp;amp;px=999" role="button" title="communitytablehigh1.gif" alt="communitytablehigh1.gif" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 13:59:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-drop-down-selection-and-aggregation/m-p/739489#M14881</guid>
      <dc:creator>Sam_SAS</dc:creator>
      <dc:date>2021-05-06T13:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: SAS drop down selection and aggregation</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-drop-down-selection-and-aggregation/m-p/739505#M14882</link>
      <description>That's great thank you very much for your help</description>
      <pubDate>Thu, 06 May 2021 15:03:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-drop-down-selection-and-aggregation/m-p/739505#M14882</guid>
      <dc:creator>vietlinh12hoa</dc:creator>
      <dc:date>2021-05-06T15:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: SAS drop down selection and aggregation</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-drop-down-selection-and-aggregation/m-p/739506#M14883</link>
      <description>Thank you very much. It works well.</description>
      <pubDate>Thu, 06 May 2021 15:06:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-drop-down-selection-and-aggregation/m-p/739506#M14883</guid>
      <dc:creator>vietlinh12hoa</dc:creator>
      <dc:date>2021-05-06T15:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: SAS drop down selection and aggregation</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-drop-down-selection-and-aggregation/m-p/739508#M14884</link>
      <description>Excellent! Thanks for letting us know</description>
      <pubDate>Thu, 06 May 2021 15:11:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-drop-down-selection-and-aggregation/m-p/739508#M14884</guid>
      <dc:creator>Sam_SAS</dc:creator>
      <dc:date>2021-05-06T15:11:25Z</dc:date>
    </item>
  </channel>
</rss>

