<?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 Compare Current 12 months to Prior 12 months in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Compare-Current-12-months-to-Prior-12-months/m-p/82690#M5487</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am new to Qlik Sense and I want to create a comparison of customer sales for prior 12 months and current 12 months to see if they increased or decreased in purchases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example if customer A buys $1000 of widgets in prior 12 months (Jun 1 2016 - May 31 2017) and then buys $2000 more in current 12 months (Jun 1 2017 - May 31 2018) they had an increase of $1000.&amp;nbsp; If customer A bought $1000 in prior 12 and $500 in current 12 there would be a -$500 decrease.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't include the current month (June 2018) in the calculations so last day end on May 31,2018.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help in building the formulas or set analysis would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written this in SQL already, but I am trying to avoid using SQL views and use Qlik.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Jun 2018 17:05:22 GMT</pubDate>
    <dc:creator>millsaz69</dc:creator>
    <dc:date>2018-06-26T17:05:22Z</dc:date>
    <item>
      <title>Compare Current 12 months to Prior 12 months</title>
      <link>https://community.qlik.com/t5/App-Development/Compare-Current-12-months-to-Prior-12-months/m-p/82690#M5487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am new to Qlik Sense and I want to create a comparison of customer sales for prior 12 months and current 12 months to see if they increased or decreased in purchases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example if customer A buys $1000 of widgets in prior 12 months (Jun 1 2016 - May 31 2017) and then buys $2000 more in current 12 months (Jun 1 2017 - May 31 2018) they had an increase of $1000.&amp;nbsp; If customer A bought $1000 in prior 12 and $500 in current 12 there would be a -$500 decrease.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't include the current month (June 2018) in the calculations so last day end on May 31,2018.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help in building the formulas or set analysis would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written this in SQL already, but I am trying to avoid using SQL views and use Qlik.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2018 17:05:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Compare-Current-12-months-to-Prior-12-months/m-p/82690#M5487</guid>
      <dc:creator>millsaz69</dc:creator>
      <dc:date>2018-06-26T17:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: Compare Current 12 months to Prior 12 months</title>
      <link>https://community.qlik.com/t5/App-Development/Compare-Current-12-months-to-Prior-12-months/m-p/82691#M5488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have no clue what your dimensions or anything looks like but the are several ways &lt;SPAN style="font-size: 10pt;"&gt;to do this,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;so heres the theory.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;You can either add a Flag Column in the backend when loading the script that marks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;this transactions as being part of last years values.&amp;nbsp; The con with this is its static and so &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;updates only on reloads.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;If you need it to be dynamic (as the user selects different years on the frontend) then you will have&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;to do it through set analysis.&amp;nbsp; Something like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;SUM( {&amp;lt; DateKey={"&amp;gt;=$(vMinDate)&amp;lt;$(vMaxDate)"} &amp;gt;} Amount )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;* vMinDate and vMaxDate are variables calculated on the fly&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Note the double quote (dont use the single quote on this)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2018 12:42:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Compare-Current-12-months-to-Prior-12-months/m-p/82691#M5488</guid>
      <dc:creator>ruanhaese</dc:creator>
      <dc:date>2018-06-27T12:42:37Z</dc:date>
    </item>
  </channel>
</rss>

