<?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 Group by not working in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Group-by-not-working/m-p/210570#M65109</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using group by to create a P&amp;amp;L but it is not working as I would expect.&lt;/P&gt;&lt;P&gt;See attached example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Jan 2010 11:07:35 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-01-13T11:07:35Z</dc:date>
    <item>
      <title>Group by not working</title>
      <link>https://community.qlik.com/t5/QlikView/Group-by-not-working/m-p/210570#M65109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using group by to create a P&amp;amp;L but it is not working as I would expect.&lt;/P&gt;&lt;P&gt;See attached example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jan 2010 11:07:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-by-not-working/m-p/210570#M65109</guid>
      <dc:creator />
      <dc:date>2010-01-13T11:07:35Z</dc:date>
    </item>
    <item>
      <title>Group by not working</title>
      <link>https://community.qlik.com/t5/QlikView/Group-by-not-working/m-p/210571#M65110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't understand what is the result you expect...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want a table like this:&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/1273.result.PNG"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/1273.result.PNG" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Try the following :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;Calculations:&lt;BR /&gt;LOAD [Type],&lt;BR /&gt;Sum(Amount) as [Gross Margin]&lt;BR /&gt;Resident FinancialResultsTable&lt;BR /&gt;WHERE [Level] = 'Sales' or [Level] = 'Cost of Sales' GROUP BY Type;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;JOIN (Calculations) LOAD Type,&lt;BR /&gt;Sum(Amount) as [Profit before Tax]&lt;BR /&gt;Resident FinancialResultsTable&lt;BR /&gt;WHERE [Level] = 'Sales' or [Level] = 'Cost of Sales' or [Level] = 'Overheads' GROUP BY Type;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;join(Calculations) LOAD [Type],&lt;BR /&gt;Sum(Amount) as [Profit After Tax]&lt;BR /&gt;Resident FinancialResultsTable&lt;BR /&gt;WHERE [Level] = 'Sales' or [Level] = 'Cost of Sales' or [Level] = 'Overheads' or [Level] = 'Tax' GROUP BY Type;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want the following :&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/5383.result2.PNG"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/5383.result2.PNG" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;JOIN(FinancialResultsTable) LOAD&lt;BR /&gt;'Gross Margin' AS [Level],&lt;BR /&gt;[Type],&lt;BR /&gt;Sum(Amount) as [Amount]&lt;BR /&gt;Resident FinancialResultsTable&lt;BR /&gt;WHERE [Level] = 'Sales' or [Level] = 'Cost of Sales' GROUP BY Type;&lt;BR /&gt;&lt;BR /&gt;JOIN(FinancialResultsTable) LOAD&lt;BR /&gt;'Profit before Tax' AS [Level],&lt;BR /&gt;[Type],&lt;BR /&gt;Sum(Amount) as [Amount]&lt;BR /&gt;Resident FinancialResultsTable&lt;BR /&gt;WHERE [Level] = 'Sales' or [Level] = 'Cost of Sales' or [Level] = 'Overheads' GROUP BY Type;&lt;BR /&gt;&lt;BR /&gt;JOIN(FinancialResultsTable) LOAD&lt;BR /&gt;'Profit After Tax' AS [Level],&lt;BR /&gt;[Type],&lt;BR /&gt;Sum(Amount) as [Amount]&lt;BR /&gt;Resident FinancialResultsTable&lt;BR /&gt;WHERE [Level] = 'Sales' or [Level] = 'Cost of Sales' or [Level] = 'Overheads' or [Level] = 'Tax' GROUP BY Type;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jan 2010 11:39:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-by-not-working/m-p/210571#M65110</guid>
      <dc:creator />
      <dc:date>2010-01-13T11:39:37Z</dc:date>
    </item>
    <item>
      <title>Group by not working</title>
      <link>https://community.qlik.com/t5/QlikView/Group-by-not-working/m-p/210572#M65111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The attached example is what I was trying to do.&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jan 2010 13:13:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-by-not-working/m-p/210572#M65111</guid>
      <dc:creator />
      <dc:date>2010-01-13T13:13:59Z</dc:date>
    </item>
  </channel>
</rss>

