<?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: fix the previous date (month) in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/fix-the-previous-date-month/m-p/1964482#M79499</link>
    <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/191501"&gt;@AhmDD&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tend to use the script to calculate any prior period by setting flags. Makes it simpler front end. Big problem you have is you appear to have the date a dimension and you trying to use it the calculation and not the selection.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Aug 2022 06:37:56 GMT</pubDate>
    <dc:creator>Mark_Little</dc:creator>
    <dc:date>2022-08-04T06:37:56Z</dc:date>
    <item>
      <title>fix the previous date (month)</title>
      <link>https://community.qlik.com/t5/App-Development/fix-the-previous-date-month/m-p/1961078#M79224</link>
      <description>&lt;P&gt;Hello everyone!&lt;/P&gt;
&lt;P&gt;I hove some simple case but can't solve it. There is some amount of sales for several years.&lt;/P&gt;
&lt;P&gt;I can display fact sales by the months during all periods.&lt;/P&gt;
&lt;P&gt;But I need to add amount of same month previous year to compare them on line graph (or any another visualisation).&lt;/P&gt;
&lt;P&gt;It's ok if I use "Above" function. Like:&amp;nbsp;Above (Measure_of_fact_sales, 12)&lt;/P&gt;
&lt;P&gt;the result is something like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AhmDD_0-1658921389107.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/85230i74071EFACD9E002B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AhmDD_0-1658921389107.png" alt="AhmDD_0-1658921389107.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Where first column - period, second - amount of previouse year, third - amount of current year.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But when i use some period filter on dashboard (for example choosing just one year) - there is resulting only of current year:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AhmDD_1-1658921508280.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/85231i553F6FAC41BF69EE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AhmDD_1-1658921508280.png" alt="AhmDD_1-1658921508280.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You can see that measure for&amp;nbsp;previouse year doesn't work when there is no any other periods in filter.&lt;/P&gt;
&lt;P&gt;So I need to fix calculation of Measure to avoid any reaction to period filter. But it must be reaction to other filters - like regions, managers and etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you a lot in advance!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 11:40:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/fix-the-previous-date-month/m-p/1961078#M79224</guid>
      <dc:creator>AhmDD</dc:creator>
      <dc:date>2022-07-27T11:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: fix the previous date (month)</title>
      <link>https://community.qlik.com/t5/App-Development/fix-the-previous-date-month/m-p/1964482#M79499</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/191501"&gt;@AhmDD&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tend to use the script to calculate any prior period by setting flags. Makes it simpler front end. Big problem you have is you appear to have the date a dimension and you trying to use it the calculation and not the selection.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 06:37:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/fix-the-previous-date-month/m-p/1964482#M79499</guid>
      <dc:creator>Mark_Little</dc:creator>
      <dc:date>2022-08-04T06:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: fix the previous date (month)</title>
      <link>https://community.qlik.com/t5/App-Development/fix-the-previous-date-month/m-p/1964499#M79502</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/191501"&gt;@AhmDD&lt;/a&gt; Try these expressions;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Current month&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;SUM({$&amp;lt;Date = {"$(='&amp;gt;=' &amp;amp; addyears(monthstart (max(Date)),0)&amp;amp; '&amp;lt;=' &amp;amp; Date(Max(Date)))"},Year,Quarter,Month,Week&amp;gt;}Measure_of_fact_sales)&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Same period the previous year&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;SUM({$&amp;lt;Date = {"$(='&amp;gt;=' &amp;amp; addyears(monthstart (max(Date)),-1)&amp;amp; '&amp;lt;=' &amp;amp; (AddYears(Max(Date), -1)))"},Year,Quarter,Month,Week&amp;gt;}Measure_of_fact_sales)&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 07:38:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/fix-the-previous-date-month/m-p/1964499#M79502</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2022-08-04T07:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: fix the previous date (month)</title>
      <link>https://community.qlik.com/t5/App-Development/fix-the-previous-date-month/m-p/1964697#M79518</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;
&lt;P&gt;You can make a master calendar to find year and month dimensions, then you can use expressions like this.&lt;/P&gt;
&lt;P&gt;Last Year&lt;BR /&gt;sum({$&amp;lt;[YEAR] = {$(=max([YEAR]-1))},mes= {'$(=month(max([MONTH])))'}&amp;gt;} [MEASURE]),&lt;/P&gt;
&lt;P&gt;Current year&lt;BR /&gt;=sum({$&amp;lt;[YEAR] = {$(=max([YEAR]))},mes= {'$(=month(max([MONTH])))'}, &amp;gt;} [MEASURE])&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 14:50:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/fix-the-previous-date-month/m-p/1964697#M79518</guid>
      <dc:creator>EdgarOlmos</dc:creator>
      <dc:date>2022-08-04T14:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: fix the previous date (month)</title>
      <link>https://community.qlik.com/t5/App-Development/fix-the-previous-date-month/m-p/1973093#M80286</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/191501"&gt;@AhmDD&lt;/a&gt;&amp;nbsp;Is your question answered?&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2022 14:10:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/fix-the-previous-date-month/m-p/1973093#M80286</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2022-08-25T14:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: fix the previous date (month)</title>
      <link>https://community.qlik.com/t5/App-Development/fix-the-previous-date-month/m-p/1973484#M80307</link>
      <description>&lt;P&gt;The problem here really is the Dimension being used&lt;/P&gt;
&lt;P&gt;if you want to see Sales for all months then &lt;U&gt;use Month as the Dimension&amp;nbsp; &lt;/U&gt;and &lt;U&gt;NOT YEARMONTH&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;202101&amp;nbsp; &lt;/U&gt;&amp;nbsp;is associated to Year 2021 Month 01, the table will aggregate associated data only&lt;/P&gt;
&lt;P&gt;Use Month dimension that does&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 922px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/87575i70D53A84E9592121/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Jan,Feb,Mar&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 09:02:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/fix-the-previous-date-month/m-p/1973484#M80307</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2022-08-26T09:02:30Z</dc:date>
    </item>
  </channel>
</rss>

