<?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: groupby and orderby clause in qlikview in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/groupby-and-orderby-clause-in-qlikview/m-p/942560#M972828</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: 10.0pt;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0 0 10pt; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: black; font-style: inherit; font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;The GROUP BY statement is used in conjunction with the aggregate functions to group the Data by one or more columns.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0 0 10pt; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="line-height: 1.5em; color: black; font-style: inherit; font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;Ex:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0 0 10pt; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;Load&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10.6666679382324px; font-style: inherit; font-family: inherit;"&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: maroon;"&gt;A&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: #000000;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: blue;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: maroon;"&gt;B&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: #000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: maroon;"&gt;B&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: #000000;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: blue;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: maroon;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: #000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: maroon;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: maroon;"&gt;D&lt;/SPAN&gt;&lt;SPAN class="apple-converted-space"&gt; on&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: blue;"&gt;From&lt;/SPAN&gt;&lt;SPAN class="apple-converted-space"&gt; Table&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: #000000;"&gt;Group by A,D;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0 0 10pt; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: black; font-style: inherit; font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;Fields used in aggregations should not be used in same statement again else users will get invalid expression You must not include fields aggregate in group by.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0 0 10pt; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: black; font-style: inherit; font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;Try to avoid fields in load statement which are not included in group by&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0 0 10pt; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: black; font-style: inherit; font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0 0 10pt; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: black; font-style: inherit; font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;The ORDER BY statement orders data ASC/DESC.by default its ascending&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;//ASC&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Key,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Job&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;RESIDENT Temp1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;ORDER BY ID, Year, Month;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;//DESC&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt; Key,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt; Year,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt; Month,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt; ID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt; Job&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;RESIDENT Temp1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;ORDER BY ID, Year, Month DESC ;//month is ordered descending.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Sep 2015 10:22:10 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-09-14T10:22:10Z</dc:date>
    <item>
      <title>groupby and orderby clause in qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/groupby-and-orderby-clause-in-qlikview/m-p/942552#M972820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys&lt;/P&gt;&lt;P&gt;I want to know use of&amp;nbsp; group by and order by clause in qlikview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 08:13:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/groupby-and-orderby-clause-in-qlikview/m-p/942552#M972820</guid>
      <dc:creator>tripatirao</dc:creator>
      <dc:date>2015-09-14T08:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: groupby and orderby clause in qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/groupby-and-orderby-clause-in-qlikview/m-p/942553#M972821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sales:&lt;/P&gt;&lt;P&gt;Load * Inline&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Customer, Year, Sales&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A, 2014, 100&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A, 2015, 120&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B, 2014, 200&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B, 2015, 220&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Final:&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;&amp;nbsp; Customer, &lt;/P&gt;&lt;P&gt;&amp;nbsp; SUM(Sales) as TotalSales&lt;/P&gt;&lt;P&gt;Resident Sales&lt;/P&gt;&lt;P&gt;Group By Customer;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table Sales;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Order By Use below link..&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/179929"&gt;Count if value does not exist in all previous rows&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 08:17:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/groupby-and-orderby-clause-in-qlikview/m-p/942553#M972821</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-09-14T08:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: groupby and orderby clause in qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/groupby-and-orderby-clause-in-qlikview/m-p/942554#M972822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Group by - this will be used when you want to get an aggregated data on specific columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Order By - will be used to order your data on certain columns either in desc or ascending.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 08:49:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/groupby-and-orderby-clause-in-qlikview/m-p/942554#M972822</guid>
      <dc:creator>manojkulkarni</dc:creator>
      <dc:date>2015-09-14T08:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: groupby and orderby clause in qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/groupby-and-orderby-clause-in-qlikview/m-p/942555#M972823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi manish &lt;/P&gt;&lt;P&gt;thanks for quick response.Can we use groupby&amp;nbsp; and order by clause together in a script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 09:57:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/groupby-and-orderby-clause-in-qlikview/m-p/942555#M972823</guid>
      <dc:creator>tripatirao</dc:creator>
      <dc:date>2015-09-14T09:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: groupby and orderby clause in qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/groupby-and-orderby-clause-in-qlikview/m-p/942556#M972824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes , you can use both group by and order by together &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 10:02:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/groupby-and-orderby-clause-in-qlikview/m-p/942556#M972824</guid>
      <dc:creator>avinashelite</dc:creator>
      <dc:date>2015-09-14T10:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: groupby and orderby clause in qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/groupby-and-orderby-clause-in-qlikview/m-p/942557#M972825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Avinash&lt;/P&gt;&lt;P&gt;Can you provide one exemple fot it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 10:07:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/groupby-and-orderby-clause-in-qlikview/m-p/942557#M972825</guid>
      <dc:creator>tripatirao</dc:creator>
      <dc:date>2015-09-14T10:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: groupby and orderby clause in qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/groupby-and-orderby-clause-in-qlikview/m-p/942558#M972826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD * Inline [&lt;/P&gt;&lt;P&gt;CustomerName, ID, Amount&lt;/P&gt;&lt;P&gt;A,1,100&lt;/P&gt;&lt;P&gt;A,2,200&lt;/P&gt;&lt;P&gt;B,1,250,&lt;/P&gt;&lt;P&gt;B,2,130 ];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;New:&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;LOAD CustomerName,&lt;/P&gt;&lt;P&gt;Count(ID) as Count,&lt;/P&gt;&lt;P&gt;sum(Amount) as Amount&lt;/P&gt;&lt;P&gt;Resident Data&lt;/P&gt;&lt;P&gt;Group by CustomerName&lt;/P&gt;&lt;P&gt;Order by CustomerName;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table Data;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see the attached&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 10:15:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/groupby-and-orderby-clause-in-qlikview/m-p/942558#M972826</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2015-09-14T10:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: groupby and orderby clause in qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/groupby-and-orderby-clause-in-qlikview/m-p/942559#M972827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD * inline&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;ID,Amount&lt;/P&gt;&lt;P&gt;10,12&lt;/P&gt;&lt;P&gt;6,26,&lt;/P&gt;&lt;P&gt;4,20&lt;/P&gt;&lt;P&gt;1,200&lt;/P&gt;&lt;P&gt;1,300&lt;/P&gt;&lt;P&gt;2,100&lt;/P&gt;&lt;P&gt;3,150&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD ID as NEw_ID,&lt;/P&gt;&lt;P&gt;sum(Amount) as Total&lt;/P&gt;&lt;P&gt;Resident&lt;/P&gt;&lt;P&gt;Temp&lt;/P&gt;&lt;P&gt;Group by ID Order By ID;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 10:15:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/groupby-and-orderby-clause-in-qlikview/m-p/942559#M972827</guid>
      <dc:creator>avinashelite</dc:creator>
      <dc:date>2015-09-14T10:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: groupby and orderby clause in qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/groupby-and-orderby-clause-in-qlikview/m-p/942560#M972828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: 10.0pt;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0 0 10pt; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: black; font-style: inherit; font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;The GROUP BY statement is used in conjunction with the aggregate functions to group the Data by one or more columns.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0 0 10pt; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="line-height: 1.5em; color: black; font-style: inherit; font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;Ex:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0 0 10pt; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;Load&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10.6666679382324px; font-style: inherit; font-family: inherit;"&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: maroon;"&gt;A&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: #000000;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: blue;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: maroon;"&gt;B&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: #000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: maroon;"&gt;B&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: #000000;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: blue;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: maroon;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: #000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: maroon;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: maroon;"&gt;D&lt;/SPAN&gt;&lt;SPAN class="apple-converted-space"&gt; on&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: blue;"&gt;From&lt;/SPAN&gt;&lt;SPAN class="apple-converted-space"&gt; Table&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10.6666679382324px; font-family: inherit; color: #000000;"&gt;Group by A,D;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0 0 10pt; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: black; font-style: inherit; font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;Fields used in aggregations should not be used in same statement again else users will get invalid expression You must not include fields aggregate in group by.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0 0 10pt; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: black; font-style: inherit; font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;Try to avoid fields in load statement which are not included in group by&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0 0 10pt; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: black; font-style: inherit; font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0 0 10pt; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: black; font-style: inherit; font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;The ORDER BY statement orders data ASC/DESC.by default its ascending&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;//ASC&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Key,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Job&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;RESIDENT Temp1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;ORDER BY ID, Year, Month;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;//DESC&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt; Key,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt; Year,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt; Month,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt; ID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt; Job&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;RESIDENT Temp1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;ORDER BY ID, Year, Month DESC ;//month is ordered descending.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 10:22:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/groupby-and-orderby-clause-in-qlikview/m-p/942560#M972828</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-14T10:22:10Z</dc:date>
    </item>
  </channel>
</rss>

