<?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 Switch measures from Quantity to Sales in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Switch-measures-from-Quantity-to-Sales/m-p/529012#M11784</link>
    <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;Using parameters, I'd like to know if it is possible to have only one Aggregate measure (in a cross table or in a graph for example) that could be either a "Sales" measure (in Euros) or a "Quantity" measure coming from my datasource.&lt;/P&gt;&lt;P&gt;The "switch" from Sales to Quantity would be done using a button bar or a dropdown list.&lt;/P&gt;&lt;P&gt;This way, I have only one object (graph...) and the user can switch easily from one to the other.&lt;/P&gt;&lt;P&gt;I tried but I don't see first How to create a button or a dropdown list that would display "Show Quantity" or&amp;nbsp; "Show turnover" .&lt;/P&gt;&lt;P&gt;Thanks !&lt;/P&gt;</description>
    <pubDate>Tue, 22 Jan 2019 11:06:00 GMT</pubDate>
    <dc:creator>VictorM</dc:creator>
    <dc:date>2019-01-22T11:06:00Z</dc:date>
    <item>
      <title>Switch measures from Quantity to Sales</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Switch-measures-from-Quantity-to-Sales/m-p/529012#M11784</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;Using parameters, I'd like to know if it is possible to have only one Aggregate measure (in a cross table or in a graph for example) that could be either a "Sales" measure (in Euros) or a "Quantity" measure coming from my datasource.&lt;/P&gt;&lt;P&gt;The "switch" from Sales to Quantity would be done using a button bar or a dropdown list.&lt;/P&gt;&lt;P&gt;This way, I have only one object (graph...) and the user can switch easily from one to the other.&lt;/P&gt;&lt;P&gt;I tried but I don't see first How to create a button or a dropdown list that would display "Show Quantity" or&amp;nbsp; "Show turnover" .&lt;/P&gt;&lt;P&gt;Thanks !&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 11:06:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Switch-measures-from-Quantity-to-Sales/m-p/529012#M11784</guid>
      <dc:creator>VictorM</dc:creator>
      <dc:date>2019-01-22T11:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Switch measures from Quantity to Sales</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Switch-measures-from-Quantity-to-Sales/m-p/529076#M11786</link>
      <description>&lt;P&gt;Hello Victor,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One approach would be to create a button bar with a 'helper' category assigned to it, where the helper category has the values 'Sales' and 'Quantity'. You would also assign a character parameter to this button bar.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then, you would create a calculated item that would look something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IF ( 'helper'p = 'Quantity' )&lt;BR /&gt;RETURN 'Quantity'n&lt;BR /&gt;ELSE 'Sales'n&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And when this calculated item is assigned, we get a result like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="picker.png" style="width: 445px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/26429i38355897AAAD6DAC/image-size/large?v=v2&amp;amp;px=999" role="button" title="picker.png" alt="picker.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Depending on the button bar selection, the chart will show the data from either the Quantity measure or the Sales measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, the drawback to this approach is you can only assign one label, one format, and one aggregation for the calculated item. But this might be fine if the data are similar.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me say here that I am not an expert on all the workarounds of report building, and someone else may have a better way to implement the above approach.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The much simpler alternative is to&amp;nbsp;use a stacking container with separate objects for the two measures.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="stack.png" style="width: 447px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/26430i1D0AFBC8310398D2/image-size/large?v=v2&amp;amp;px=999" role="button" title="stack.png" alt="stack.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Here, there are separate charts for Quantity and Sales, but only one is shown at a time depending on which item in container is selected.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hopefully one of these approaches will work for you. Let us know!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Sam&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 15:25:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Switch-measures-from-Quantity-to-Sales/m-p/529076#M11786</guid>
      <dc:creator>Sam_SAS</dc:creator>
      <dc:date>2019-01-22T15:25:41Z</dc:date>
    </item>
  </channel>
</rss>

