<?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: Change Measure / Group when drill down on a bar chart in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Change-Measure-Group-when-drill-down-on-a-bar-chart/m-p/273189#M4385</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/78572"&gt;@anthony28852﻿&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The way I've found you can do that is by implementing your own drill down capability, so you know in wich level of the hierarchy you are and use that information to modify the data item assigned to the group role. It's not ideal, but it worked.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the example below, I have a "hiearchy" with 4 levels (&lt;STRONG&gt;Continent&lt;/STRONG&gt; / &lt;STRONG&gt;Country&lt;/STRONG&gt; / &lt;STRONG&gt;State&lt;/STRONG&gt; / &lt;STRONG&gt;City&lt;/STRONG&gt;) so I've added 3 drop-down lists to perform the navigation, one for each level of the hierarchy (we don't need a drop-down for the last level of&amp;nbsp;the hierarchy). Each one of the drop-down controls has a parameter assigned to them called &lt;STRONG&gt;_continent&lt;/STRONG&gt;, &lt;STRONG&gt;_country&lt;/STRONG&gt;, and &lt;STRONG&gt;_state&lt;/STRONG&gt; respectively.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Those parameters were used to derive two calculated items: &lt;STRONG&gt;Geo&lt;/STRONG&gt; and &lt;STRONG&gt;Geo Subdivision&lt;/STRONG&gt;. &lt;STRONG&gt;Geo&lt;/STRONG&gt; contains the values of the current level of the hierarchy, and &lt;STRONG&gt;Geo Subdivision&lt;/STRONG&gt; contains the next level. For example, if nothing is selected in the drop-down controls, it means we are at the highest level of the hierarchy (so &lt;STRONG&gt;Geo&lt;/STRONG&gt; works as continent and &lt;STRONG&gt;Geo Subdivision&lt;/STRONG&gt; works as country). If a continent is selected, &lt;STRONG&gt;Geo&lt;/STRONG&gt; will be displaying countries and &lt;STRONG&gt;Geo Subdivision&lt;/STRONG&gt; will contain the states (and so on...)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Expression for &lt;STRONG&gt;Geo&lt;/STRONG&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3340i036A68266329C6BB/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Expression Geo.PNG" title="Expression Geo.PNG" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Expression for &lt;STRONG&gt;Geo Subdivision&lt;/STRONG&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3341iFF1748204C5A859F/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Expression Geo Subdivision.PNG" title="Expression Geo Subdivision.PNG" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've then assigned &lt;STRONG&gt;Geo&lt;/STRONG&gt; to the Category role in the Bar Chart and &lt;STRONG&gt;Geo Subdivision&lt;/STRONG&gt; in the Group role, as well as &lt;STRONG&gt;Revenue&lt;/STRONG&gt; as the measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Finally, the interactions were defined as below. Observe that this gives a cascading prompt from continent to country to state.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3342i4BBF92FC883AB5AC/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Interactions" title="Interactions" /&gt;&lt;/P&gt;
&lt;P&gt;This is the final result (initially at the continent level):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3339i4F6941367F241049/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Figure1.PNG" title="Figure1.PNG" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Choose North America as the continent:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3343iDC92D0F2E3479A50/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Drill into North America" title="Drill into North America" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Choose United States as the country:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3344iD5985D320A54BA3E/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Drill into United States" title="Drill into United States" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Choose Texas as the state:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3345iB3B32013564507DF/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Drill into Texas" title="Drill into Texas" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To help identify which level of the hierarch we are looking at, I've added a Button Bar at the top left of the report and assigned a calculated item to it called &lt;STRONG&gt;Geo Level&lt;/STRONG&gt;, defined as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3346i9138A49AB9BA793F/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Expression for Geo Level" title="Expression for Geo Level" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Renato&lt;/P&gt;</description>
    <pubDate>Thu, 26 May 2016 03:28:41 GMT</pubDate>
    <dc:creator>Renato_sas</dc:creator>
    <dc:date>2016-05-26T03:28:41Z</dc:date>
    <item>
      <title>Change Measure / Group when drill down on a bar chart</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Change-Measure-Group-when-drill-down-on-a-bar-chart/m-p/272582#M4321</link>
      <description>&lt;P&gt;Let say I have a table like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Continent&lt;/TD&gt;&lt;TD&gt;Country&lt;/TD&gt;&lt;TD&gt;City&lt;/TD&gt;&lt;TD&gt;Revenue (M)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;America&lt;/TD&gt;&lt;TD&gt;USA&lt;/TD&gt;&lt;TD&gt;New York&lt;/TD&gt;&lt;TD&gt;1000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;America&lt;/TD&gt;&lt;TD&gt;USA&lt;/TD&gt;&lt;TD&gt;New York&lt;/TD&gt;&lt;TD&gt;2000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;America&lt;/TD&gt;&lt;TD&gt;USA&lt;/TD&gt;&lt;TD&gt;Texas&lt;/TD&gt;&lt;TD&gt;1500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;America&lt;/TD&gt;&lt;TD&gt;USA&lt;/TD&gt;&lt;TD&gt;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&gt;&lt;TD&gt;Malaysia&lt;/TD&gt;&lt;TD&gt;Kuala Lumpur&lt;/TD&gt;&lt;TD&gt;1500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Asia&lt;/TD&gt;&lt;TD&gt;Malaysia&lt;/TD&gt;&lt;TD&gt;Kuala Lumpur&lt;/TD&gt;&lt;TD&gt;2000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Asia&lt;/TD&gt;&lt;TD&gt;Malaysia&lt;/TD&gt;&lt;TD&gt;Johor Bahru&lt;/TD&gt;&lt;TD&gt;1500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Asia&lt;/TD&gt;&lt;TD&gt;Malaysia&lt;/TD&gt;&lt;TD&gt;Johor Bahru&lt;/TD&gt;&lt;TD&gt;1000&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to have a drill down stacked-bar chart that represent this.&lt;/P&gt;&lt;P&gt;On the first level, the category should be Continent and&amp;nbsp;the Group should be Country with the Revenue as the Value.&lt;/P&gt;&lt;P&gt;After drilling down, the category should be Country and the Group should be City.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can achieve the category changing by using hierarchy, but how do I change the grouping everytime I drilldown?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anthony Steven&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2016 23:09:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Change-Measure-Group-when-drill-down-on-a-bar-chart/m-p/272582#M4321</guid>
      <dc:creator>anthony28852</dc:creator>
      <dc:date>2016-05-23T23:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: Change Measure / Group when drill down on a bar chart</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Change-Measure-Group-when-drill-down-on-a-bar-chart/m-p/273189#M4385</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/78572"&gt;@anthony28852﻿&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The way I've found you can do that is by implementing your own drill down capability, so you know in wich level of the hierarchy you are and use that information to modify the data item assigned to the group role. It's not ideal, but it worked.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the example below, I have a "hiearchy" with 4 levels (&lt;STRONG&gt;Continent&lt;/STRONG&gt; / &lt;STRONG&gt;Country&lt;/STRONG&gt; / &lt;STRONG&gt;State&lt;/STRONG&gt; / &lt;STRONG&gt;City&lt;/STRONG&gt;) so I've added 3 drop-down lists to perform the navigation, one for each level of the hierarchy (we don't need a drop-down for the last level of&amp;nbsp;the hierarchy). Each one of the drop-down controls has a parameter assigned to them called &lt;STRONG&gt;_continent&lt;/STRONG&gt;, &lt;STRONG&gt;_country&lt;/STRONG&gt;, and &lt;STRONG&gt;_state&lt;/STRONG&gt; respectively.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Those parameters were used to derive two calculated items: &lt;STRONG&gt;Geo&lt;/STRONG&gt; and &lt;STRONG&gt;Geo Subdivision&lt;/STRONG&gt;. &lt;STRONG&gt;Geo&lt;/STRONG&gt; contains the values of the current level of the hierarchy, and &lt;STRONG&gt;Geo Subdivision&lt;/STRONG&gt; contains the next level. For example, if nothing is selected in the drop-down controls, it means we are at the highest level of the hierarchy (so &lt;STRONG&gt;Geo&lt;/STRONG&gt; works as continent and &lt;STRONG&gt;Geo Subdivision&lt;/STRONG&gt; works as country). If a continent is selected, &lt;STRONG&gt;Geo&lt;/STRONG&gt; will be displaying countries and &lt;STRONG&gt;Geo Subdivision&lt;/STRONG&gt; will contain the states (and so on...)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Expression for &lt;STRONG&gt;Geo&lt;/STRONG&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3340i036A68266329C6BB/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Expression Geo.PNG" title="Expression Geo.PNG" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Expression for &lt;STRONG&gt;Geo Subdivision&lt;/STRONG&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3341iFF1748204C5A859F/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Expression Geo Subdivision.PNG" title="Expression Geo Subdivision.PNG" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've then assigned &lt;STRONG&gt;Geo&lt;/STRONG&gt; to the Category role in the Bar Chart and &lt;STRONG&gt;Geo Subdivision&lt;/STRONG&gt; in the Group role, as well as &lt;STRONG&gt;Revenue&lt;/STRONG&gt; as the measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Finally, the interactions were defined as below. Observe that this gives a cascading prompt from continent to country to state.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3342i4BBF92FC883AB5AC/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Interactions" title="Interactions" /&gt;&lt;/P&gt;
&lt;P&gt;This is the final result (initially at the continent level):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3339i4F6941367F241049/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Figure1.PNG" title="Figure1.PNG" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Choose North America as the continent:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3343iDC92D0F2E3479A50/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Drill into North America" title="Drill into North America" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Choose United States as the country:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3344iD5985D320A54BA3E/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Drill into United States" title="Drill into United States" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Choose Texas as the state:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3345iB3B32013564507DF/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Drill into Texas" title="Drill into Texas" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To help identify which level of the hierarch we are looking at, I've added a Button Bar at the top left of the report and assigned a calculated item to it called &lt;STRONG&gt;Geo Level&lt;/STRONG&gt;, defined as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3346i9138A49AB9BA793F/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Expression for Geo Level" title="Expression for Geo Level" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Renato&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2016 03:28:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Change-Measure-Group-when-drill-down-on-a-bar-chart/m-p/273189#M4385</guid>
      <dc:creator>Renato_sas</dc:creator>
      <dc:date>2016-05-26T03:28:41Z</dc:date>
    </item>
  </channel>
</rss>

