<?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: Percent Totals for Grids in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Percent-Totals-for-Grids/m-p/1200999#M386741</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If any one is interested here is the answer to having the total percentages in the horizontal line. Works fine except it takes a long time to calculate. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aggr(sum(aggr(if(avg($(vFieldChart1Ring1))&amp;gt;= vGridR1LCL, if(avg($(vFieldChart1Ring1))&amp;lt;= vGridR1UCL, 1,0),0), ($(vGridXpos1)),($(vGridXpos2)))), ($(vGridXpos1))) / Aggr(Count(DISTINCT ($(vGridXpos2)) ), ($(vGridXpos1)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// vGridXpos1 = Allocates a number based apon Dist Group and Ring 1 or Ring 2 using the Match command&lt;/P&gt;&lt;P&gt;// vGridXpos2 = Determine's the field&amp;nbsp; in the Cylic Group Layer or Layer and Pass for Ring 1 or Ring 2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 16 Oct 2016 08:28:03 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-10-16T08:28:03Z</dc:date>
    <item>
      <title>Percent Totals for Grids</title>
      <link>https://community.qlik.com/t5/QlikView/Percent-Totals-for-Grids/m-p/1200998#M386740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif;"&gt;Hi I have Grid chart as shown below where the average temperature of a process is being recorded for every layer (1 to 6) and every 10m (0 to 130m). To achieve this the average value &lt;SPAN style="color: #0000ff;"&gt;(Avg($(vFieldChart1Ring1))&lt;/SPAN&gt; is calculated by Layer (Y) and distance (X) , in this case the distance is every 10m, but I also group the data into 250mm, 500mm &amp;amp; 1m.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif;"&gt;&lt;IMG alt="Grid.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/139577_Grid.jpg" style="height: 327px; width: 620px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif;"&gt;What I would like to do is show the total percentages as highlighted in Yellow above both both Layers and distance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Arial',sans-serif;"&gt;To achieve the Red and Green Colours I have an expression under the background colours where the average value is compared to variables representing upper and lower limits.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif;"&gt;vGridR1LCL = Lower Limit&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif;"&gt;vGridR1UCL = Upper Limit&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;avg&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;$(vFieldChart1Ring1)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;)&amp;gt;= &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;vGridR1LCL&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;avg&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;$(vFieldChart1Ring1)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;)&amp;lt;= &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;vGridR1UCL&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;RGB&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(128,255,0),&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;RGB&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(255,0,0)),&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;RGB&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(255,0,0)) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// Green Red, Red&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif;"&gt;I Have then used the same expression on a Straight Table but replaced the Green with 1 and the Red with 0 to display 100% or 0% against every dot.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;avg&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;$(vFieldChart1Ring1)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;)&amp;gt;= &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;vGridR1LCL&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;avg&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;$(vFieldChart1Ring1)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;)&amp;lt;= &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;vGridR1UCL&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, 1,0),0).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif;"&gt;My problem comes when I try to group the data by both X &amp;amp; Y (Distance &amp;amp; Layer) to show the percentage total’s as highlighted in Yellow.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif;"&gt;I’ve tried using the “Aggr”&amp;nbsp; function to group the data and show the results &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif;"&gt;&lt;STRONG&gt;Group R1 Test Totals Test 1&lt;/STRONG&gt;:- This just give 100% for every distance group.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;avg&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;$(vFieldChart1Ring1)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;)&amp;gt;= &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;vGridR1LCL&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;avg&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;$(vFieldChart1Ring1)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;)&amp;lt;= &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;vGridR1UCL&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, 1,0),0),(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;[XPosition R1 10m]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;/1000)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial',sans-serif;"&gt;&lt;STRONG&gt;Group R1 Test Totals Test 2:- This just give 100% for every distance group.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;AGGr&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;avg&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;$(vFieldChart1Ring1)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;)&amp;gt;= &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;vGridR1LCL&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;avg&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;$(vFieldChart1Ring1)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;)&amp;lt;= &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;vGridR1UCL&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, 1,0),0),(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;[XPosition R1 10m]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;/1000),&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;[R1 Layer]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;))&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;IMG alt="Grid2.jpg" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/139578_Grid2.jpg" style="height: 427px; width: 620px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 9pt;"&gt;Any help would be &lt;/SPAN&gt;&lt;SPAN style="font-size: 12px;"&gt;appreciated&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Mark&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2016 14:43:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percent-Totals-for-Grids/m-p/1200998#M386740</guid>
      <dc:creator />
      <dc:date>2016-10-04T14:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: Percent Totals for Grids</title>
      <link>https://community.qlik.com/t5/QlikView/Percent-Totals-for-Grids/m-p/1200999#M386741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If any one is interested here is the answer to having the total percentages in the horizontal line. Works fine except it takes a long time to calculate. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aggr(sum(aggr(if(avg($(vFieldChart1Ring1))&amp;gt;= vGridR1LCL, if(avg($(vFieldChart1Ring1))&amp;lt;= vGridR1UCL, 1,0),0), ($(vGridXpos1)),($(vGridXpos2)))), ($(vGridXpos1))) / Aggr(Count(DISTINCT ($(vGridXpos2)) ), ($(vGridXpos1)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// vGridXpos1 = Allocates a number based apon Dist Group and Ring 1 or Ring 2 using the Match command&lt;/P&gt;&lt;P&gt;// vGridXpos2 = Determine's the field&amp;nbsp; in the Cylic Group Layer or Layer and Pass for Ring 1 or Ring 2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Oct 2016 08:28:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percent-Totals-for-Grids/m-p/1200999#M386741</guid>
      <dc:creator />
      <dc:date>2016-10-16T08:28:03Z</dc:date>
    </item>
  </channel>
</rss>

