<?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: Calculated Measure - Maximum of an Average measure in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Calculated-Measure-Maximum-of-an-Average-measure/m-p/895791#M17536</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/443128"&gt;@Pandomania&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wrote an article outlining how I used the AggregateCells operator with Display Rules to get this solution:&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="01_FinalSolution_Australia.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88316i7CAB025C2D33CE0A/image-size/large?v=v2&amp;amp;px=999" role="button" title="01_FinalSolution_Australia.png" alt="01_FinalSolution_Australia.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See the steps here:&amp;nbsp;&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/VA-Report-Example-Use-a-Display-Rule-to-highlight-the-maximum-of/ta-p/895788" target="_self"&gt;VA Report Example: Use a Display Rule to highlight the maximum of an average measure&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps!&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;Teri&lt;/P&gt;</description>
    <pubDate>Mon, 25 Sep 2023 20:33:29 GMT</pubDate>
    <dc:creator>TeriPatsilaras</dc:creator>
    <dc:date>2023-09-25T20:33:29Z</dc:date>
    <item>
      <title>Calculated Measure - Maximum of an Average measure</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Calculated-Measure-Maximum-of-an-Average-measure/m-p/877857#M17257</link>
      <description>&lt;P&gt;I am using SAS Viya.&lt;BR /&gt;I want to be able to highlight the highest (Maximum) value on a Bar chart.&lt;/P&gt;&lt;P&gt;The measure is Average Gross Margin which is a calculated measure of (Product Sale - Product Cost of Sale) aggregated as an average.&lt;/P&gt;&lt;P&gt;My Category is a Hierarchical Geographic one - Continent: Country: Region: City.&lt;/P&gt;&lt;P&gt;I presume I need to create a new calculated measure that can identity the Maximum of the Averages calculated at each level in the hierarchy as I drill down.&lt;/P&gt;&lt;P&gt;I know there is a restriction on nested aggregations. I have found the AggregateTable option which appears to get around that nesting restriction. But I can't get it to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I did....&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pandomania_0-1685187293816.png" style="width: 533px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/84382iDF440CB5AE0B43AF/image-dimensions/533x280?v=v2" width="533" height="280" role="button" title="Pandomania_0-1685187293816.png" alt="Pandomania_0-1685187293816.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Or as Text:&amp;nbsp;AggregateTable(_Max_, Table(_Avg_, Fixed(), ( 'Product Sale'n -&amp;nbsp;'Product Cost of Sale'n )))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought this would give the Maximum of the Average amounts. But it gives me the overall Average for the level of the hierarchy I am currently in. I can use this to highlight all the category values that are above or below the average for that level. But I want to be able to highlight the category with the highest value (Maximum).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can create a Rule to highlight categories using my new measure, but it identifies all that are above the overall average for the hierarchy level.&lt;BR /&gt;In the diagram below, the Average Gross Margin across all continents is $3.15.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the Bar chart the first three bars all have a value of &amp;gt;= $3.15.&lt;/P&gt;&lt;P&gt;How can I create a measure that will allow me to only highlight the longest bar (South America)? $5.95...&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="Pandomania_2-1685188855301.png" style="width: 594px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/84384iA53E2A109895492E/image-dimensions/594x276?v=v2" width="594" height="276" role="button" title="Pandomania_2-1685188855301.png" alt="Pandomania_2-1685188855301.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...and then as I drill down to Country level only highlight Peru ($6.35).&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="Pandomania_3-1685189176538.png" style="width: 653px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/84385i82554ACF731B8729/image-dimensions/653x292?v=v2" width="653" height="292" role="button" title="Pandomania_3-1685189176538.png" alt="Pandomania_3-1685189176538.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 May 2023 22:50:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Calculated-Measure-Maximum-of-an-Average-measure/m-p/877857#M17257</guid>
      <dc:creator>Pandomania</dc:creator>
      <dc:date>2023-05-27T22:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Measure - Maximum of an Average measure</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Calculated-Measure-Maximum-of-an-Average-measure/m-p/895791#M17536</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/443128"&gt;@Pandomania&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wrote an article outlining how I used the AggregateCells operator with Display Rules to get this solution:&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="01_FinalSolution_Australia.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88316i7CAB025C2D33CE0A/image-size/large?v=v2&amp;amp;px=999" role="button" title="01_FinalSolution_Australia.png" alt="01_FinalSolution_Australia.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See the steps here:&amp;nbsp;&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/VA-Report-Example-Use-a-Display-Rule-to-highlight-the-maximum-of/ta-p/895788" target="_self"&gt;VA Report Example: Use a Display Rule to highlight the maximum of an average measure&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps!&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;Teri&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2023 20:33:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Calculated-Measure-Maximum-of-an-Average-measure/m-p/895791#M17536</guid>
      <dc:creator>TeriPatsilaras</dc:creator>
      <dc:date>2023-09-25T20:33:29Z</dc:date>
    </item>
  </channel>
</rss>

