<?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 convert DENSE_RANK Over Partition BY into Qlik Sense in Load Script in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-convert-DENSE-RANK-Over-Partition-BY-into-Qlik-Sense-in/m-p/1808051#M65797</link>
    <description>&lt;P&gt;I'm trying to convert the following from SQL to Qlik Sense:&lt;/P&gt;&lt;P&gt;CONCAT('Invoice ', DENSE_RANK() OVER (PARTITION BY [Account Number], [Type ] ORDER BY [Year Month])),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to do "Invoice 1", Invoice 2", "Invoice 3" etc etc. This was a calculated field before in SQL but I need to know how to convert this into Qlik and I'm not sure the best way how exactly. I've seen articles where it's been pulled off on the front end but I want to see if there is a way to pull this off in the load script.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated!&lt;/P&gt;</description>
    <pubDate>Fri, 14 May 2021 16:24:37 GMT</pubDate>
    <dc:creator>default_the_pig</dc:creator>
    <dc:date>2021-05-14T16:24:37Z</dc:date>
    <item>
      <title>How to convert DENSE_RANK Over Partition BY into Qlik Sense in Load Script</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-convert-DENSE-RANK-Over-Partition-BY-into-Qlik-Sense-in/m-p/1808051#M65797</link>
      <description>&lt;P&gt;I'm trying to convert the following from SQL to Qlik Sense:&lt;/P&gt;&lt;P&gt;CONCAT('Invoice ', DENSE_RANK() OVER (PARTITION BY [Account Number], [Type ] ORDER BY [Year Month])),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to do "Invoice 1", Invoice 2", "Invoice 3" etc etc. This was a calculated field before in SQL but I need to know how to convert this into Qlik and I'm not sure the best way how exactly. I've seen articles where it's been pulled off on the front end but I want to see if there is a way to pull this off in the load script.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 16:24:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-convert-DENSE-RANK-Over-Partition-BY-into-Qlik-Sense-in/m-p/1808051#M65797</guid>
      <dc:creator>default_the_pig</dc:creator>
      <dc:date>2021-05-14T16:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert DENSE_RANK Over Partition BY into Qlik Sense in Load Script</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-convert-DENSE-RANK-Over-Partition-BY-into-Qlik-Sense-in/m-p/1808416#M65837</link>
      <description>&lt;P&gt;I believe load script like this should do the trick:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Data:
LOAD * INLINE [
	Account Number, Type, Year Month
    1, A, 202101
    1, A, 202102
    1, A, 202103
    2, A, 202102
    2, A, 202103
    2, A, 202104
    3, B, 202103
    3, B, 202104
    3, B, 202105
];

Final:
LOAD [Account Number],
	[Type],
    [Year Month],
    IF([Account Number] = PREVIOUS([Account Number]) AND [Type] = PREVIOUS([Type]), PEEK([Invoice Number])+1, 1) AS [Invoice Number]
RESIDENT Data
ORDER BY [Type], [Account Number], [Year Month];

DROP TABLE Data;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 14:24:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-convert-DENSE-RANK-Over-Partition-BY-into-Qlik-Sense-in/m-p/1808416#M65837</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2021-05-17T14:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert DENSE_RANK Over Partition BY into Qlik Sense in Load Script</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-convert-DENSE-RANK-Over-Partition-BY-into-Qlik-Sense-in/m-p/1808457#M65841</link>
      <description>&lt;P&gt;Thank you, Nicole! That did the trick.&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 15:57:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-convert-DENSE-RANK-Over-Partition-BY-into-Qlik-Sense-in/m-p/1808457#M65841</guid>
      <dc:creator>default_the_pig</dc:creator>
      <dc:date>2021-05-17T15:57:16Z</dc:date>
    </item>
  </channel>
</rss>

