<?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 How to group specific values in a table? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-group-specific-values-in-a-table/m-p/322368#M707697</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;but why dont you use sum(Quantity) * avg(price) as expresion?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Nov 2011 14:35:20 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-11-17T14:35:20Z</dc:date>
    <item>
      <title>How to group specific values in a table?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-group-specific-values-in-a-table/m-p/322364#M707693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everybody!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to group one table (Prices) with one specific value to be calculated over a volume table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have in the table Prices in one month 3 levels (Product, Destination, Type), but I only want Product and Destination and in this table I need an average of the results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tested it via Group by, but the results is not satisfactory yet, calculating the table volumes over prices, the values are being duplicated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see below some details about it:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Untitled.png" class="jive-image-thumbnail jive-image" height="344" onclick="" src="https://community.qlik.com/legacyfs/online/8649_Untitled.png" style="height: 344px; width: 715.52px;" width="715" /&gt;&lt;/P&gt;&lt;P&gt;I have the following script behind:&lt;/P&gt;&lt;P&gt;//////////////&lt;/P&gt;&lt;P&gt;test:&lt;/P&gt;&lt;P&gt;LOAD Month, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Destination, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Type,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month&amp;amp;Product&amp;amp;Destination as Link,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; price&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;teste.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Price);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;test3:&lt;/P&gt;&lt;P&gt;left join&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Link as Link,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;avg(price) as average&lt;/P&gt;&lt;P&gt;Resident test&lt;/P&gt;&lt;P&gt;group by Link;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Testex:&lt;/P&gt;&lt;P&gt;LOAD Link as Link, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Quantity&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;C:\Users\chduartel\Desktop\Group\teste.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Quantity);&lt;/P&gt;&lt;P&gt;/////////////////////////&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anybody help me to create a simple solution for it? (field average one time vs. sum of quantity)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note, the solution of doing the formula avg(average) + sum(Quantity) doesn't work without detailing the months, products and destination.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find enclosed the files containing the information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Leandro Duarte&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 22:00:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-group-specific-values-in-a-table/m-p/322364#M707693</guid>
      <dc:creator />
      <dc:date>2011-11-15T22:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to group specific values in a table?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-group-specific-values-in-a-table/m-p/322365#M707694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Maybe like this? I calculated also the sum of quantities in the script (do you need it to be selection sensitive?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;test:&lt;/P&gt;&lt;P&gt;LOAD Month,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Destination,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Type,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month&amp;amp;Product&amp;amp;Destination as Link,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; price&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;teste.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Price);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Testex:&lt;/P&gt;&lt;P&gt;LOAD Link as Link,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Quantity&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;teste.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Quantity);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;test2:&lt;/P&gt;&lt;P&gt;Load Link, sum(Quantity) as SumQuantity resident Testex group by Link;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;test3:&lt;/P&gt;&lt;P&gt;left join&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt; Link as Link,&lt;/P&gt;&lt;P&gt; avg(price) as average&lt;/P&gt;&lt;P&gt;Resident test&lt;/P&gt;&lt;P&gt;group by Link;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 23:41:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-group-specific-values-in-a-table/m-p/322365#M707694</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-11-15T23:41:31Z</dc:date>
    </item>
    <item>
      <title>How to group specific values in a table?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-group-specific-values-in-a-table/m-p/322366#M707695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have tested with Load Distinct... any other suggestion?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 19:13:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-group-specific-values-in-a-table/m-p/322366#M707695</guid>
      <dc:creator />
      <dc:date>2011-11-16T19:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to group specific values in a table?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-group-specific-values-in-a-table/m-p/322367#M707696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did not get your point. You tested with Load Distinct? &lt;/P&gt;&lt;P&gt;Since I have not used a load distinct (as far as I remember and can see from my post), what do you want to tell me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If my above code does not work for your problem, please specify, what the exact problem is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2011 13:57:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-group-specific-values-in-a-table/m-p/322367#M707696</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-11-17T13:57:32Z</dc:date>
    </item>
    <item>
      <title>How to group specific values in a table?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-group-specific-values-in-a-table/m-p/322368#M707697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;but why dont you use sum(Quantity) * avg(price) as expresion?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2011 14:35:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-group-specific-values-in-a-table/m-p/322368#M707697</guid>
      <dc:creator />
      <dc:date>2011-11-17T14:35:20Z</dc:date>
    </item>
    <item>
      <title>How to group specific values in a table?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-group-specific-values-in-a-table/m-p/322369#M707698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;or if you want to calculate average price in script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;//////////////&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;test:&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;LOAD Month,&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product,&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Destination,&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Type,&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month&amp;amp;Product&amp;amp;Destination as Link,&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; price&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;FROM&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;teste.xlsx&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;(ooxml, embedded labels, table is Price);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;Testex:&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;LOAD Link as Link,&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Quantity&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;FROM&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;C:\Users\chduartel\Desktop\Group\teste.xlsx&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;(ooxml, embedded labels, table is Quantity);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;left join&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;Load&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Link as Link,&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; avg(price) as average&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;Resident test&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;group by Link;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;/////////////////////////&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2011 14:50:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-group-specific-values-in-a-table/m-p/322369#M707698</guid>
      <dc:creator />
      <dc:date>2011-11-17T14:50:31Z</dc:date>
    </item>
  </channel>
</rss>

