<?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: Problem summing an aggregated average in pivot table in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Problem-summing-an-aggregated-average-in-pivot-table/m-p/1828923#M68320</link>
    <description>&lt;P&gt;Thanks, that is what I needed!&lt;/P&gt;</description>
    <pubDate>Mon, 16 Aug 2021 21:40:12 GMT</pubDate>
    <dc:creator>mabryanjr</dc:creator>
    <dc:date>2021-08-16T21:40:12Z</dc:date>
    <item>
      <title>Problem summing an aggregated average in pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Problem-summing-an-aggregated-average-in-pivot-table/m-p/1828917#M68316</link>
      <description>&lt;P&gt;I have a pivot table that calculates average weekly values at a locations within various regions, and I need those average values to sum up to their total within the region.&lt;/P&gt;&lt;P&gt;The expression used to generate the weekly average per location is:&lt;/P&gt;&lt;P&gt;Avg({&amp;lt;[Event Date] ={$(vR5Wk)},Event={'Event A'}&amp;gt;} Aggr(Sum({&amp;lt;[Event Date] ={$(vR5Wk)},Event={'Event A'}&amp;gt;}EventCount),[Event Date], Region, Location))&lt;/P&gt;&lt;P&gt;vR5Wk is a variable to capture the Event Dates in the most recent 5 weeks&lt;/P&gt;&lt;P&gt;the events are tied to region and location by association to another table via their key&lt;/P&gt;&lt;P&gt;I have tried to sum the aggregation of the above measure, but am not getting the desired results.&amp;nbsp; Any assistance or thoughts are much appreciated.&amp;nbsp; Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 20:58:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problem-summing-an-aggregated-average-in-pivot-table/m-p/1828917#M68316</guid>
      <dc:creator>mabryanjr</dc:creator>
      <dc:date>2021-08-16T20:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problem summing an aggregated average in pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Problem-summing-an-aggregated-average-in-pivot-table/m-p/1828918#M68317</link>
      <description>&lt;P&gt;To clarify...as you can see in the QS Pivot Table Extract, the totals are an average of the locations in each region.&amp;nbsp; I need to get the sum.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 21:00:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problem-summing-an-aggregated-average-in-pivot-table/m-p/1828918#M68317</guid>
      <dc:creator>mabryanjr</dc:creator>
      <dc:date>2021-08-16T21:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problem summing an aggregated average in pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Problem-summing-an-aggregated-average-in-pivot-table/m-p/1828920#M68318</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/147686"&gt;@mabryanjr&lt;/a&gt;&amp;nbsp; try below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;=if(dimensionality()=1,
sum({&amp;lt;[Event Date] ={$(vR5Wk)},Event={'Event A'}&amp;gt;} Aggr(Sum({&amp;lt;[Event Date] ={$(vR5Wk)},Event={'Event A'}&amp;gt;}EventCount),[Event Date], Region, Location)),

Avg({&amp;lt;[Event Date] ={$(vR5Wk)},Event={'Event A'}&amp;gt;} Aggr(Sum({&amp;lt;[Event Date] ={$(vR5Wk)},Event={'Event A'}&amp;gt;}EventCount),[Event Date], Region, Location)))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or bit optimized&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;=if(dimensionality()=1,
Sum({&amp;lt;[Event Date] ={$(vR5Wk)},Event={'Event A'}&amp;gt;}EventCount),

Avg({&amp;lt;[Event Date] ={$(vR5Wk)},Event={'Event A'}&amp;gt;} Aggr(Sum({&amp;lt;[Event Date] ={$(vR5Wk)},Event={'Event A'}&amp;gt;}EventCount),[Event Date], Region, Location)))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 21:21:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problem-summing-an-aggregated-average-in-pivot-table/m-p/1828920#M68318</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2021-08-16T21:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem summing an aggregated average in pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Problem-summing-an-aggregated-average-in-pivot-table/m-p/1828923#M68320</link>
      <description>&lt;P&gt;Thanks, that is what I needed!&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 21:40:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problem-summing-an-aggregated-average-in-pivot-table/m-p/1828923#M68320</guid>
      <dc:creator>mabryanjr</dc:creator>
      <dc:date>2021-08-16T21:40:12Z</dc:date>
    </item>
  </channel>
</rss>

