<?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: Expression: Averages using Pivot vs Straight table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-Averages-using-Pivot-vs-Straight-table/m-p/1111410#M904429</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See attached for example. I'm trying to get my pivot table to match the straight table. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Jun 2016 17:09:40 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-06-24T17:09:40Z</dc:date>
    <item>
      <title>Expression: Averages using Pivot vs Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Averages-using-Pivot-vs-Straight-table/m-p/1111407#M904426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;I have an Avg expression in a straight table and pivot table: Avg(days). In the straight table I have the ability to select what type of expression totals I would like. So I select Expression totals: Avg. This gives me the Avg of the Avg for my total. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;I really need to use a Pivot table, so I am trying to dupilcate the numbers from above. So, I tried &lt;SPAN style="color: #0000ff;"&gt;avg&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;aggr&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;AVG&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Days&lt;/SPAN&gt;), &lt;SPAN style="color: #800000;"&gt;PROGRAM&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;Division&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;REGION&lt;/SPAN&gt;)) . This gives me a match to the above straight table for the totals but I'm now not getting a true average for my dimensions. I'm seeing an average of the averages, not an overall true avg like the straigh table. I hope this is clear. If so, is there a solution? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;What I want to see. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: arial,helvetica,sans-serif;"&gt;Use a Pivot table. Receive a true average of my dimension and for the totals see an Average of an Average, like the straight table. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Averages-using-Pivot-vs-Straight-table/m-p/1111407#M904426</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Expression: Averages using Pivot vs Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Averages-using-Pivot-vs-Straight-table/m-p/1111408#M904427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you post which dimensions you are using in your chart and what you want to see at each dimensional level (e.g. using a screenshot of your two charts)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe try to use Dimensionality() to branch into different expressions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If(Dimensionality() = 0, &lt;SPAN style="font-size: 16px; color: #0000ff;"&gt;avg&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-size: 16px;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 16px; color: #0000ff;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-size: 16px;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 16px; color: #0000ff;"&gt;AVG&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-size: 16px;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 16px; color: #800000;"&gt;Days&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-size: 16px;"&gt;), &lt;/SPAN&gt;&lt;SPAN style="font-size: 16px; color: #800000;"&gt;PROGRAM&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-size: 16px;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 16px; color: #800000;"&gt;Division&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-size: 16px;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 16px; color: #800000;"&gt;REGION&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-size: 16px;"&gt;)), Avg(Days) )&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2016 15:18:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Averages-using-Pivot-vs-Straight-table/m-p/1111408#M904427</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-06-24T15:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Expression: Averages using Pivot vs Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Averages-using-Pivot-vs-Straight-table/m-p/1111409#M904428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it would be good to explore a without Dimensionality() solution first before going into that territory. So as Stefan mentioned, it would be good to know what all are your straight table dimensions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Were you use PROGRAM, Division, REGION as dimensions and Avg(Days) as your expression? or are there more or less dimensions in the straight table? Also do you have the same dimensions in your pivot table? If possible provide a sample to further explore. If nothing works, then I think Dimensionality() should work as Stefan pointed out above&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2016 16:27:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Averages-using-Pivot-vs-Straight-table/m-p/1111409#M904428</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-06-24T16:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: Expression: Averages using Pivot vs Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Averages-using-Pivot-vs-Straight-table/m-p/1111410#M904429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See attached for example. I'm trying to get my pivot table to match the straight table. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2016 17:09:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Averages-using-Pivot-vs-Straight-table/m-p/1111410#M904429</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-24T17:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: Expression: Averages using Pivot vs Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Averages-using-Pivot-vs-Straight-table/m-p/1111411#M904430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have provided an example below. Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2016 17:31:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Averages-using-Pivot-vs-Straight-table/m-p/1111411#M904430</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-24T17:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: Expression: Averages using Pivot vs Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Averages-using-Pivot-vs-Straight-table/m-p/1111412#M904431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the dirty way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Dimensionality() = 0, Avg(Aggr(AVG(Days), Reason)), Avg(Days))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Update: &lt;BR /&gt;&lt;/STRONG&gt;May be Stefan can offer a more cleaner solution. I am unable to make this to work for right now&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2016 17:31:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Averages-using-Pivot-vs-Straight-table/m-p/1111412#M904431</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-06-24T17:31:44Z</dc:date>
    </item>
  </channel>
</rss>

