<?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: Chart Dimensions and Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Chart-Dimensions-and-Set-Analysis/m-p/476883#M479898</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm glad you were able to figure it out &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Jan 2014 18:05:12 GMT</pubDate>
    <dc:creator>Nicole-Smith</dc:creator>
    <dc:date>2014-01-07T18:05:12Z</dc:date>
    <item>
      <title>Chart Dimensions and Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Chart-Dimensions-and-Set-Analysis/m-p/476877#M479892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I keep running into this need. So far I've found work arounds that involve modifying the data model, but I need to see if there is a "right" way to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are a grocery chain. A simplified view of our data model includes dimensions such as products, baskets, store and Measures like Amount, cost, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A fairly common need in my reporting is a chart - frequently a pivot table where product is one of the dimensions.&lt;/P&gt;&lt;P&gt;A very common measure used in our reports is Basket Average- Total Amount/# of Transactions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I need to make a pivot table where product is the dimension, and basket average is the measure, I only get the sum of the amount for the Product. I would guess this is because pivot tables partition the data by the product dimension. What I need is the total amount of all baskets where the basket contained this product.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried several variations on this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;%TransactionKey=P({$&amp;lt;Product=Product&amp;gt;}%TransactionKey)&amp;gt;}Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've also been experimenting with the AGGR function but have yet to produce the desired results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would imagine this is a fairly common need, someone must know how this is done. Please help. Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample Data (Simple Pivot Table):&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Pivot.JPG.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/51169_Pivot.JPG.jpg" /&gt;&lt;/P&gt;&lt;P&gt;Net Sales: Sum({$&amp;lt;[PLU Code]=P(DG_PLUCode)&amp;gt;}Amount*NetFlag)&lt;/P&gt;&lt;P&gt;Transaction Count: Sum({$&amp;lt;[PLU Code]=P(DG_PLUCode)&amp;gt;}TransactionCount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set analysis is used to show only products that are in our "Sample Set"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's look at the first PLU listed: 85317600030 with 243 Transactions. My problems would be easily solved if I could display the total sales where that PLU is in the basket. The manual way to gather this information would be to select the PLU, then select possible transactions. Then de-select the PLU and calculate the sum Net Sales Amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could then divide this number by the transaction count to recieve my desired basket average.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2014 15:35:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chart-Dimensions-and-Set-Analysis/m-p/476877#M479892</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-07T15:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Dimensions and Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Chart-Dimensions-and-Set-Analysis/m-p/476878#M479893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post a small example set of data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2014 16:06:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chart-Dimensions-and-Set-Analysis/m-p/476878#M479893</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2014-01-07T16:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Dimensions and Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Chart-Dimensions-and-Set-Analysis/m-p/476879#M479894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I edited my original post to further clarify.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2014 16:34:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chart-Dimensions-and-Set-Analysis/m-p/476879#M479894</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-07T16:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Dimensions and Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Chart-Dimensions-and-Set-Analysis/m-p/476880#M479895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Without being able to play around with your actual .qvw, I can give you a route you may want to explore...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since PLU is a dimension, we will want to use the &lt;STRONG&gt;total&lt;/STRONG&gt; keyword to ignore it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can then use &amp;lt;&amp;gt; to denote which fields we do &lt;EM&gt;not&lt;/EM&gt; want the total to ignore.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I think you may need something like:&lt;/P&gt;&lt;P&gt;sum(total &amp;lt;Transaction&amp;gt; Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This sum will ignore PLU (and any other fields), but it will include Transaction (you can also add other fields to the expression that you want it to include).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2014 16:56:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chart-Dimensions-and-Set-Analysis/m-p/476880#M479895</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2014-01-07T16:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Dimensions and Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Chart-Dimensions-and-Set-Analysis/m-p/476881#M479896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As Nicole suggested, this would be easier to answer if you could post a small sample QVW. But my guess is that you are not using the TOTAL qualifier in&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum({$&amp;lt;%TransactionKey=P({$&amp;lt;Product=Product&amp;gt;}%TransactionKey)&amp;gt;}Amount)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;You are still trapped in the Product dim until you add TOTAL:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum({$&amp;lt;%TransactionKey=P({$&amp;lt;Product=Product&amp;gt;}%TransactionKey)&amp;gt;} TOTAL Amount)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;You may need to constrain TOTAL by another dim in the chart like Store. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum({$&amp;lt;%TransactionKey=P({$&amp;lt;Product=Product&amp;gt;}%TransactionKey)&amp;gt;} TOTAL&amp;lt;Store&amp;gt; Amount)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2014 17:17:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chart-Dimensions-and-Set-Analysis/m-p/476881#M479896</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2014-01-07T17:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Dimensions and Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Chart-Dimensions-and-Set-Analysis/m-p/476882#M479897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This helped point me in the right direction, but ultimately figured it out myself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[PLU Code]=P(DG_PLUCode)&amp;gt;}aggr(sum({$&amp;lt;%TransactionKey=P({$&amp;lt;[PLU Code]=P(DG_PLUCode)&amp;gt;})&amp;gt;}Total&amp;lt;%TransactionKey&amp;gt; Amount*NetFlag),%TransactionKey))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not too pretty but it's quick and gets me what I need.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2014 17:48:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chart-Dimensions-and-Set-Analysis/m-p/476882#M479897</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-07T17:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Dimensions and Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Chart-Dimensions-and-Set-Analysis/m-p/476883#M479898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm glad you were able to figure it out &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2014 18:05:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chart-Dimensions-and-Set-Analysis/m-p/476883#M479898</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2014-01-07T18:05:12Z</dc:date>
    </item>
  </channel>
</rss>

