<?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: Equivalent to PowerPivot's EARLIER function in Qlik in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Equivalent-to-PowerPivot-s-EARLIER-function-in-Qlik/m-p/821632#M471851</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately in this case I need 1,2,11,12,21,22 so first doesn't help, but might in other examples&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thnaks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Mar 2015 17:19:08 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-03-04T17:19:08Z</dc:date>
    <item>
      <title>Equivalent to PowerPivot's EARLIER function in Qlik</title>
      <link>https://community.qlik.com/t5/QlikView/Equivalent-to-PowerPivot-s-EARLIER-function-in-Qlik/m-p/821627#M471846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 11.6999998092651px; font-family: Arial, sans-serif, 'Nimbus Sans L'; color: #111111;"&gt;Hi Newbie question&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 11.6999998092651px; font-family: Arial, sans-serif, 'Nimbus Sans L'; color: #111111;"&gt;I'm trying to understand any limitations of Qlik calculated fields. I am moving over form PowerPivot and the support guys are stuck on creating the equivalent of the EARLIER function. I was wondering if anyone had experience moving from PowerPivot and can tell me if there is an equivalent or not. The EARLIER function allows you create filters/sets on the fly of things that match within the database. i use this a lot for ranking transactions like finding the first transaction for each customer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 11.6999998092651px; font-family: Arial, sans-serif, 'Nimbus Sans L'; color: #111111;"&gt;The particular example i'm looking for is as follows in powerpivot&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 11.6999998092651px; font-family: Arial, sans-serif, 'Nimbus Sans L'; color: #111111;"&gt;=if([Transaction]="redeem" &amp;amp;&amp;amp; [Pass Group]&amp;lt;&amp;gt;"lesson",&lt;/P&gt;&lt;P style="font-size: 11.6999998092651px; font-family: Arial, sans-serif, 'Nimbus Sans L'; color: #111111;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RANKX(&lt;/P&gt;&lt;P style="font-size: 11.6999998092651px; font-family: Arial, sans-serif, 'Nimbus Sans L'; color: #111111;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FILTER(&lt;/P&gt;&lt;P style="font-size: 11.6999998092651px; font-family: Arial, sans-serif, 'Nimbus Sans L'; color: #111111;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; transactions,[Transaction]="redeem" &amp;amp;&amp;amp;&lt;/P&gt;&lt;P style="font-size: 11.6999998092651px; font-family: Arial, sans-serif, 'Nimbus Sans L'; color: #111111;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Parent Product ID]=EARLIER([Parent Product ID]) &amp;amp;&amp;amp;&lt;/P&gt;&lt;P style="font-size: 11.6999998092651px; font-family: Arial, sans-serif, 'Nimbus Sans L'; color: #111111;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Gym ID]=EARLIER([Gym ID]) &amp;amp;&amp;amp;&lt;/P&gt;&lt;P style="font-size: 11.6999998092651px; font-family: Arial, sans-serif, 'Nimbus Sans L'; color: #111111;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Transaction Month]=EARLIER([Transaction Month])&lt;/P&gt;&lt;P style="font-size: 11.6999998092651px; font-family: Arial, sans-serif, 'Nimbus Sans L'; color: #111111;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;/P&gt;&lt;P style="font-size: 11.6999998092651px; font-family: Arial, sans-serif, 'Nimbus Sans L'; color: #111111;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Transaction No],,1,skip&lt;/P&gt;&lt;P style="font-size: 11.6999998092651px; font-family: Arial, sans-serif, 'Nimbus Sans L'; color: #111111;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;/P&gt;&lt;P style="font-size: 11.6999998092651px; font-family: Arial, sans-serif, 'Nimbus Sans L'; color: #111111;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; blank()&lt;/P&gt;&lt;P style="font-size: 11.6999998092651px; font-family: Arial, sans-serif, 'Nimbus Sans L'; color: #111111;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 11.6999998092651px; font-family: Arial, sans-serif, 'Nimbus Sans L'; color: #111111;"&gt;&amp;nbsp;&amp;nbsp; So what this is doing is for each line in the transaction table it finds the other lines that are redeem, same gym id, same month and same product ID, then ranks the line it is on amongst these lines based on transaction no.&amp;nbsp; It then moves ot he next line and creates a new set on the fly etc etc processing each line in the transaction table.&amp;nbsp; At the end I have a whole raft of transctions marked as 1 as they were the first transaction of a month for a gym for a product.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 11.6999998092651px; font-family: Arial, sans-serif, 'Nimbus Sans L'; color: #111111;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; It may be this is just beyond Qlik or much easier to do within PowerPivot so any guidence appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 11.6999998092651px; font-family: Arial, sans-serif, 'Nimbus Sans L'; color: #111111;"&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2015 18:08:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Equivalent-to-PowerPivot-s-EARLIER-function-in-Qlik/m-p/821627#M471846</guid>
      <dc:creator />
      <dc:date>2015-02-17T18:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Equivalent to PowerPivot's EARLIER function in Qlik</title>
      <link>https://community.qlik.com/t5/QlikView/Equivalent-to-PowerPivot-s-EARLIER-function-in-Qlik/m-p/821628#M471847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you could do it with calculated dimensions and/or set analysis expressions quite similar, have a look here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3676"&gt;Calculated Dimensions&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/2967"&gt;AGGR...&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/4076"&gt;A Primer on Set Analysis&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2015 19:44:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Equivalent-to-PowerPivot-s-EARLIER-function-in-Qlik/m-p/821628#M471847</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-02-18T19:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: Equivalent to PowerPivot's EARLIER function in Qlik</title>
      <link>https://community.qlik.com/t5/QlikView/Equivalent-to-PowerPivot-s-EARLIER-function-in-Qlik/m-p/821629#M471848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unfortunately this seems a the wrong way round.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found an example of how to use the aggr function so you could do calculations like rank the sales of each sales person. So this is creating a collection of sets and then ranking them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i need to do are rank within the sets. I looked everywhere and can't find any way of achieving this. Seems like quite an obvious thing to do which is why Powerpivot has this EARLIER function.&amp;nbsp; I use this so much that without seeing a clear path to replacing it I'll have abandon Qlik. Maybe someone else has an idea&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2015 16:57:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Equivalent-to-PowerPivot-s-EARLIER-function-in-Qlik/m-p/821629#M471848</guid>
      <dc:creator />
      <dc:date>2015-03-04T16:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: Equivalent to PowerPivot's EARLIER function in Qlik</title>
      <link>https://community.qlik.com/t5/QlikView/Equivalent-to-PowerPivot-s-EARLIER-function-in-Qlik/m-p/821630#M471849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See FirstSortedValue()&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2015 17:07:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Equivalent-to-PowerPivot-s-EARLIER-function-in-Qlik/m-p/821630#M471849</guid>
      <dc:creator>luciancotea</dc:creator>
      <dc:date>2015-03-04T17:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: Equivalent to PowerPivot's EARLIER function in Qlik</title>
      <link>https://community.qlik.com/t5/QlikView/Equivalent-to-PowerPivot-s-EARLIER-function-in-Qlik/m-p/821631#M471850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm sure that are ways within qv to reach your goals. If I think again about your question you want to compare a row-value with the row-value from another record, yes? Then you could use previous() or peek() within the script (it's rather recommended to do such steps within the script or at least generate some pre-calculations) or you used functions like above() or below() within a pivot-chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3048"&gt;Peek() vs Previous() – When to Use Each&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2015 17:14:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Equivalent-to-PowerPivot-s-EARLIER-function-in-Qlik/m-p/821631#M471850</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-03-04T17:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: Equivalent to PowerPivot's EARLIER function in Qlik</title>
      <link>https://community.qlik.com/t5/QlikView/Equivalent-to-PowerPivot-s-EARLIER-function-in-Qlik/m-p/821632#M471851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately in this case I need 1,2,11,12,21,22 so first doesn't help, but might in other examples&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thnaks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2015 17:19:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Equivalent-to-PowerPivot-s-EARLIER-function-in-Qlik/m-p/821632#M471851</guid>
      <dc:creator />
      <dc:date>2015-03-04T17:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: Equivalent to PowerPivot's EARLIER function in Qlik</title>
      <link>https://community.qlik.com/t5/QlikView/Equivalent-to-PowerPivot-s-EARLIER-function-in-Qlik/m-p/821633#M471852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds like I need someone who know what they are doing!!!&amp;nbsp; Essentially yes you are calculating based off previous row, but only within sets. Qlik have pointed me at a partner who seems keen to have a go!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2015 17:21:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Equivalent-to-PowerPivot-s-EARLIER-function-in-Qlik/m-p/821633#M471852</guid>
      <dc:creator />
      <dc:date>2015-03-04T17:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: Equivalent to PowerPivot's EARLIER function in Qlik</title>
      <link>https://community.qlik.com/t5/QlikView/Equivalent-to-PowerPivot-s-EARLIER-function-in-Qlik/m-p/821634#M471853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well turns out the answer is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=aggr(rank(min({&amp;lt;Transaction={'redeem'},[Transaction ID]=&amp;gt;}-[Transaction ID])),[Product ID],[Gym ID],[Transaction ID])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generated by a qlik partner, but I have no idea why the syntax works!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2015 17:33:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Equivalent-to-PowerPivot-s-EARLIER-function-in-Qlik/m-p/821634#M471853</guid>
      <dc:creator />
      <dc:date>2015-03-09T17:33:33Z</dc:date>
    </item>
  </channel>
</rss>

