<?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>idea Equivalent of SQL OVER (PARTITION BY ... ORDER BY ...) Functionality in Suggest an Idea</title>
    <link>https://community.qlik.com/t5/Suggest-an-Idea/Equivalent-of-SQL-OVER-PARTITION-BY-ORDER-BY-Functionality/idi-p/1759151</link>
    <description>&lt;P&gt;It would be really helpful to include support for analytic functions in the Qlik Sense load script. This allows you to partition data into groups, and apply functions on those groups.&lt;/P&gt;&lt;P&gt;Suppose you have a list of events and categories, and you want to number the events in order of date within each category:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;event type&lt;/TD&gt;&lt;TD&gt;date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Picnic&lt;/TD&gt;&lt;TD&gt;2019-03-04&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Festival&lt;/TD&gt;&lt;TD&gt;2019-04-05&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Picnic&lt;/TD&gt;&lt;TD&gt;2019-05-06&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Festival&lt;/TD&gt;&lt;TD&gt;2019-06-07&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;In SQL you would write:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;SELECT
[event type],
[date],
ROW_NUMBER() OVER (PARTITION BY [event type] ORDER BY [date] ASC) as [event number]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This would produce:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;event type&lt;/TD&gt;&lt;TD&gt;date&lt;/TD&gt;&lt;TD&gt;event number&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Picnic&lt;/TD&gt;&lt;TD&gt;2019-03-04&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Picnic&lt;/TD&gt;&lt;TD&gt;2019-05-06&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Festival&lt;/TD&gt;&lt;TD&gt;2019-04-05&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Festival&lt;/TD&gt;&lt;TD&gt;2019-06-07&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;The equivalent process in Qlik script is much trickier. e.g. &lt;A href="https://community.qlik.com/t5/QlikView-Scripting/ROW-NUMBER-OVER-PARTITION-BY-A-B-C-ordered-by-x/td-p/123009" target="_self"&gt;See this forum question.&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Nov 2020 08:50:26 GMT</pubDate>
    <dc:creator>daviewales</dc:creator>
    <dc:date>2020-11-25T08:50:26Z</dc:date>
    <item>
      <title>Re: Equivalent of SQL OVER (PARTITION BY ... ORDER BY ...) Functionality - Status changed to: Open - Collecting Feedback</title>
      <link>https://community.qlik.com/t5/Suggest-an-Idea/Equivalent-of-SQL-OVER-PARTITION-BY-ORDER-BY-Functionality/idc-p/1784709#M5190</link>
      <description>&lt;P&gt;Thank you for your feedback on ways to improve our product. While this is something we understand would be useful, it's not on the short-term roadmap. Please continue to show your support for this idea.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Patric&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 13:37:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Suggest-an-Idea/Equivalent-of-SQL-OVER-PARTITION-BY-ORDER-BY-Functionality/idc-p/1784709#M5190</guid>
      <dc:creator>Patric_Nordstrom</dc:creator>
      <dc:date>2021-02-22T13:37:54Z</dc:date>
    </item>
    <item>
      <title>From now on, please track this idea from the Ideation por...</title>
      <link>https://community.qlik.com/t5/Suggest-an-Idea/Equivalent-of-SQL-OVER-PARTITION-BY-ORDER-BY-Functionality/idc-p/2113382#M15115</link>
      <description>&lt;P&gt;From now on, please track this idea from the Ideation portal.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A title="Link to new idea" href="https://ideation.qlik.com/app/#/case/274749" target="_blank" rel="noopener"&gt;Link to new idea&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Meghann&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;EM&gt;NOTE: Upon clicking this link 2 tabs may open - please feel free to close the one with a login page. If you &lt;STRONG&gt;only&lt;/STRONG&gt; see 1 tab with the login page, please try clicking this link first: &lt;STRONG&gt;&lt;A title="Authenticate me!" href="#" target="_blank" rel="noopener"&gt;Authenticate me!&lt;/A&gt;&lt;/STRONG&gt;&amp;nbsp;t&lt;/EM&gt;&lt;EM&gt;hen try the link above again. Ensure pop-up blocker is off.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2023 13:02:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Suggest-an-Idea/Equivalent-of-SQL-OVER-PARTITION-BY-ORDER-BY-Functionality/idc-p/2113382#M15115</guid>
      <dc:creator>Meghann_MacDonald</dc:creator>
      <dc:date>2023-09-05T13:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Equivalent of SQL OVER (PARTITION BY ... ORDER BY ...) Functionality - Status changed to: Closed - Archived</title>
      <link>https://community.qlik.com/t5/Suggest-an-Idea/Equivalent-of-SQL-OVER-PARTITION-BY-ORDER-BY-Functionality/idc-p/2113383#M15116</link>
      <description />
      <pubDate>Tue, 05 Sep 2023 13:02:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Suggest-an-Idea/Equivalent-of-SQL-OVER-PARTITION-BY-ORDER-BY-Functionality/idc-p/2113383#M15116</guid>
      <dc:creator>Ideation</dc:creator>
      <dc:date>2023-09-05T13:02:02Z</dc:date>
    </item>
  </channel>
</rss>

