<?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: Variation (%) between Month for Current Year and The same Month of the last year in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Variation-between-Month-for-Current-Year-and-The-same-Month-of/m-p/2046408#M86075</link>
    <description>&lt;P&gt;In case you want to calculate period over period, I suggest you to learn more about as-of tables.&lt;/P&gt;
&lt;P&gt;This post explains all you need to know to create more flexible scenarios.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Design/The-As-Of-Table/ba-p/1466130" target="_self"&gt;The as-of Table&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Mar 2023 18:50:04 GMT</pubDate>
    <dc:creator>rpennacchi</dc:creator>
    <dc:date>2023-03-07T18:50:04Z</dc:date>
    <item>
      <title>Variation (%) between Month for Current Year and The same Month of the last year</title>
      <link>https://community.qlik.com/t5/App-Development/Variation-between-Month-for-Current-Year-and-The-same-Month-of/m-p/2046356#M86070</link>
      <description>&lt;P&gt;Hello Community,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;I want to calculate the variation (%) of the amount beetwen the current Month and the same Month of the previous Year .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does any one Have a solution ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank You for your support and help&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 17:15:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Variation-between-Month-for-Current-Year-and-The-same-Month-of/m-p/2046356#M86070</guid>
      <dc:creator>FARQLIK</dc:creator>
      <dc:date>2023-03-07T17:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: Variation (%) between Month for Current Year and The same Month of the last year</title>
      <link>https://community.qlik.com/t5/App-Development/Variation-between-Month-for-Current-Year-and-The-same-Month-of/m-p/2046405#M86074</link>
      <description>&lt;P&gt;You can create a dim_Calendar like these:&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;TRACE Creating Calendary;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;let vMin_Date = '01/01/2022';&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;let vMax_Date = TODAY();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;// Generate a record of each day betwen two dates&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;[TMP Dim_Calendary]:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;LOAD&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;'$(vMin_Date)' + ROWNO()-1 as DATE_TEMP&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;AUTOGENERATE vMax_Date-vMin_Date+1;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;Dim_Calendary:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;NOCONCATENATE LOAD&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;DATE_TEMP+0 as ORDER_DATE_KEY, // KEY FIELD !!!&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;DATE(DATE_TEMP) as ORDER_DATE,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;-InYearToDate(DATE_TEMP, '$(vMax_Date)', 0) as DATE_IS_IN_ACTUAL_YEAR, // Actual Year&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;-InYearToDate(DATE_TEMP, '$(vMax_Date)', -1) as DATE_IS_IN_LAST_YEAR // Last Year&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;RESIDENT [TMP Dim_Calendary];&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;DROP Table [TMP Dim_Calendary];&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Remember that your date field from your fact table needs to have the same name than&amp;nbsp;ORDER_DATE_KEY.&lt;/P&gt;
&lt;P&gt;Now on your dashboard you can create a set analysis on your KPI like:&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;(Sum({DATE_IS_IN_ACTUAL_YEAR = {1}}SALES) - Sum({DATE_IS_IN_LAST_YEAR = {1}}SALES)) /&amp;nbsp;Sum({DATE_IS_IN_LAST_YEAR = {1}}SALES)&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 18:40:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Variation-between-Month-for-Current-Year-and-The-same-Month-of/m-p/2046405#M86074</guid>
      <dc:creator>rpennacchi</dc:creator>
      <dc:date>2023-03-07T18:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: Variation (%) between Month for Current Year and The same Month of the last year</title>
      <link>https://community.qlik.com/t5/App-Development/Variation-between-Month-for-Current-Year-and-The-same-Month-of/m-p/2046408#M86075</link>
      <description>&lt;P&gt;In case you want to calculate period over period, I suggest you to learn more about as-of tables.&lt;/P&gt;
&lt;P&gt;This post explains all you need to know to create more flexible scenarios.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Design/The-As-Of-Table/ba-p/1466130" target="_self"&gt;The as-of Table&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 18:50:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Variation-between-Month-for-Current-Year-and-The-same-Month-of/m-p/2046408#M86075</guid>
      <dc:creator>rpennacchi</dc:creator>
      <dc:date>2023-03-07T18:50:04Z</dc:date>
    </item>
  </channel>
</rss>

