<?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 Pivot table with a twist in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Pivot-table-with-a-twist/m-p/977693#M974038</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ok so I have a pivot table with a collapsible dimension with the below expression.&lt;/P&gt;&lt;P&gt;my Dimensions are Site and Date (Date is inside Site)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now if I expand the dimensions I get counts based on the below expression and if I collapse it I get the sum of those counts( or a count of all dates depending on how you wanna think of it)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ok so everyones familiar with that, is their a way to swap that sum with an average so that when the dimension is collapsed we get the average count for each day?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MainCarriagewayDataFilteringOutput.site1.v&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'&amp;lt;50'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Timestamp&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;while im on it I tried to do something similar using Aggr but for some reasons is giving strange numbers, I suspect a syntax error so if anyone can spot it id appreciate it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; avg(aggr(&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MainCarriagewayDataFilteringOutput.site1.v&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'&amp;lt;50'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Timestamp&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;,Date))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Sep 2015 13:49:23 GMT</pubDate>
    <dc:creator>samuel_brierley</dc:creator>
    <dc:date>2015-09-04T13:49:23Z</dc:date>
    <item>
      <title>Pivot table with a twist</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-table-with-a-twist/m-p/977693#M974038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ok so I have a pivot table with a collapsible dimension with the below expression.&lt;/P&gt;&lt;P&gt;my Dimensions are Site and Date (Date is inside Site)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now if I expand the dimensions I get counts based on the below expression and if I collapse it I get the sum of those counts( or a count of all dates depending on how you wanna think of it)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ok so everyones familiar with that, is their a way to swap that sum with an average so that when the dimension is collapsed we get the average count for each day?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MainCarriagewayDataFilteringOutput.site1.v&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'&amp;lt;50'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Timestamp&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;while im on it I tried to do something similar using Aggr but for some reasons is giving strange numbers, I suspect a syntax error so if anyone can spot it id appreciate it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; avg(aggr(&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MainCarriagewayDataFilteringOutput.site1.v&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'&amp;lt;50'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Timestamp&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;,Date))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2015 13:49:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-table-with-a-twist/m-p/977693#M974038</guid>
      <dc:creator>samuel_brierley</dc:creator>
      <dc:date>2015-09-04T13:49:23Z</dc:date>
    </item>
  </channel>
</rss>

