<?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 Calculate previous week from a predefined period in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Calculate-previous-week-from-a-predefined-period/m-p/1919830#M75702</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;i need your support.&lt;/P&gt;
&lt;P&gt;I have to calculate values of the previous week from a period that the user can define. (ex.1 Month, 1 week, 2 weeks or from day x to day y)&lt;/P&gt;
&lt;P&gt;The calendar is built on this format date YYYYMMDD&lt;/P&gt;
&lt;P&gt;I made this formula LastWeek = (PeriodTime Variable) - 7&lt;/P&gt;
&lt;P&gt;It works if user takes as reference a day of 2nd, 3rd, 4rd week. The problem is when i select day/s from the 1rst week.&lt;/P&gt;
&lt;P&gt;Here some screen --&amp;gt; selected period&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mattiat91_0-1650363487401.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/77390i4F3EB8D503FEE27C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mattiat91_0-1650363487401.png" alt="mattiat91_0-1650363487401.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In the previous week formula&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mattiat91_1-1650363549566.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/77391i0A8704A4E70B5CE7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mattiat91_1-1650363549566.png" alt="mattiat91_1-1650363549566.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Changing month, format goes to week format. Why?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Apr 2022 10:24:34 GMT</pubDate>
    <dc:creator>mattiat91</dc:creator>
    <dc:date>2022-04-19T10:24:34Z</dc:date>
    <item>
      <title>Calculate previous week from a predefined period</title>
      <link>https://community.qlik.com/t5/App-Development/Calculate-previous-week-from-a-predefined-period/m-p/1919830#M75702</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;i need your support.&lt;/P&gt;
&lt;P&gt;I have to calculate values of the previous week from a period that the user can define. (ex.1 Month, 1 week, 2 weeks or from day x to day y)&lt;/P&gt;
&lt;P&gt;The calendar is built on this format date YYYYMMDD&lt;/P&gt;
&lt;P&gt;I made this formula LastWeek = (PeriodTime Variable) - 7&lt;/P&gt;
&lt;P&gt;It works if user takes as reference a day of 2nd, 3rd, 4rd week. The problem is when i select day/s from the 1rst week.&lt;/P&gt;
&lt;P&gt;Here some screen --&amp;gt; selected period&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mattiat91_0-1650363487401.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/77390i4F3EB8D503FEE27C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mattiat91_0-1650363487401.png" alt="mattiat91_0-1650363487401.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In the previous week formula&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mattiat91_1-1650363549566.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/77391i0A8704A4E70B5CE7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mattiat91_1-1650363549566.png" alt="mattiat91_1-1650363549566.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Changing month, format goes to week format. Why?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 10:24:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculate-previous-week-from-a-predefined-period/m-p/1919830#M75702</guid>
      <dc:creator>mattiat91</dc:creator>
      <dc:date>2022-04-19T10:24:34Z</dc:date>
    </item>
  </channel>
</rss>

