<?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 Issue with set analysis calculation of dates period set in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Issue-with-set-analysis-calculation-of-dates-period-set/m-p/2495845#M102599</link>
    <description>&lt;P&gt;Hi all. Could someone please help me to clarify why my calculation doesn't work for all cases I tested.&lt;BR /&gt;What I need to do:&lt;BR /&gt;1. I need to calculate the list of dates that are included in the period selected by the user. The user can select in the fields Year, Quarter, Month, Week, Day. Like&amp;nbsp;period from 25/10/2024 to 22/10/2024.&lt;BR /&gt;&lt;BR /&gt;2. Than I need to calculate the number of days that are included in the selected period. For&amp;nbsp;period from 25/10/2024 to 22/10/2024 it is gonna be 4 days.&lt;BR /&gt;&lt;BR /&gt;3. I need to count previous day before earliest date in the period. It gonna be&amp;nbsp;21/10/2024 - max date of the new calculated period&lt;BR /&gt;&lt;BR /&gt;4.&amp;nbsp;Then I subtract 4 days from the 21/10/2024 and calculate the last date of the new period. It will be 18/10/2024.&lt;/P&gt;
&lt;P&gt;Here how result looks like&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Peony_0-1733245163472.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/175152i299C20D60DB78FEF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Peony_0-1733245163472.png" alt="Peony_0-1733245163472.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All issues starts when I use selection only for several filters. Lets say I I select Year = 2024, Quarter = Q4, Month = October. In this case list of dates from selected period will be from 31/10/2024 to 01/10/2024. Amount of days for this period is 31. So I expected to get results for calculated period&amp;nbsp;30/09/2024 to 31/08/2024. But in fact I received nothing&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Peony_1-1733245769298.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/175153i4BF350862D8C43BB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Peony_1-1733245769298.png" alt="Peony_1-1733245769298.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;As far as I see, it happens because&amp;nbsp;31/08/2024 is relate to Q3. And till I have Q4 selected I will receive empty results. But I excluded possible field selections in set analysis for calculated period and I don't understand why it does not work.&amp;nbsp;&lt;BR /&gt;My formula is&amp;nbsp;&lt;BR /&gt;=Concat({&amp;lt;Day=, Week= ,Month =, Quater =, Year =, OrderDateKey={"&amp;gt;$(=$(vComparedDateMin))&amp;lt;=$(=$(vComparedDateMax))"}&amp;gt;}OrderDate, ' ')&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;OrderDateKey - is field that contained numeric value of date&lt;BR /&gt;vComparedDateMin - earliest date in a new periods set&lt;BR /&gt;vComparedDateMax - latest date&amp;nbsp; in a new periods set&lt;BR /&gt;OrderDate - formated date values&lt;BR /&gt;&lt;BR /&gt;I also add .qvf file (created in QlikView so I'm not sure if Qlik Sense will work correctly with it)&lt;BR /&gt;I'll be very appreciate for any help or hint&lt;/P&gt;</description>
    <pubDate>Tue, 03 Dec 2024 17:19:40 GMT</pubDate>
    <dc:creator>Peony</dc:creator>
    <dc:date>2024-12-03T17:19:40Z</dc:date>
    <item>
      <title>Issue with set analysis calculation of dates period set</title>
      <link>https://community.qlik.com/t5/App-Development/Issue-with-set-analysis-calculation-of-dates-period-set/m-p/2495845#M102599</link>
      <description>&lt;P&gt;Hi all. Could someone please help me to clarify why my calculation doesn't work for all cases I tested.&lt;BR /&gt;What I need to do:&lt;BR /&gt;1. I need to calculate the list of dates that are included in the period selected by the user. The user can select in the fields Year, Quarter, Month, Week, Day. Like&amp;nbsp;period from 25/10/2024 to 22/10/2024.&lt;BR /&gt;&lt;BR /&gt;2. Than I need to calculate the number of days that are included in the selected period. For&amp;nbsp;period from 25/10/2024 to 22/10/2024 it is gonna be 4 days.&lt;BR /&gt;&lt;BR /&gt;3. I need to count previous day before earliest date in the period. It gonna be&amp;nbsp;21/10/2024 - max date of the new calculated period&lt;BR /&gt;&lt;BR /&gt;4.&amp;nbsp;Then I subtract 4 days from the 21/10/2024 and calculate the last date of the new period. It will be 18/10/2024.&lt;/P&gt;
&lt;P&gt;Here how result looks like&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Peony_0-1733245163472.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/175152i299C20D60DB78FEF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Peony_0-1733245163472.png" alt="Peony_0-1733245163472.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All issues starts when I use selection only for several filters. Lets say I I select Year = 2024, Quarter = Q4, Month = October. In this case list of dates from selected period will be from 31/10/2024 to 01/10/2024. Amount of days for this period is 31. So I expected to get results for calculated period&amp;nbsp;30/09/2024 to 31/08/2024. But in fact I received nothing&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Peony_1-1733245769298.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/175153i4BF350862D8C43BB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Peony_1-1733245769298.png" alt="Peony_1-1733245769298.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;As far as I see, it happens because&amp;nbsp;31/08/2024 is relate to Q3. And till I have Q4 selected I will receive empty results. But I excluded possible field selections in set analysis for calculated period and I don't understand why it does not work.&amp;nbsp;&lt;BR /&gt;My formula is&amp;nbsp;&lt;BR /&gt;=Concat({&amp;lt;Day=, Week= ,Month =, Quater =, Year =, OrderDateKey={"&amp;gt;$(=$(vComparedDateMin))&amp;lt;=$(=$(vComparedDateMax))"}&amp;gt;}OrderDate, ' ')&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;OrderDateKey - is field that contained numeric value of date&lt;BR /&gt;vComparedDateMin - earliest date in a new periods set&lt;BR /&gt;vComparedDateMax - latest date&amp;nbsp; in a new periods set&lt;BR /&gt;OrderDate - formated date values&lt;BR /&gt;&lt;BR /&gt;I also add .qvf file (created in QlikView so I'm not sure if Qlik Sense will work correctly with it)&lt;BR /&gt;I'll be very appreciate for any help or hint&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2024 17:19:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Issue-with-set-analysis-calculation-of-dates-period-set/m-p/2495845#M102599</guid>
      <dc:creator>Peony</dc:creator>
      <dc:date>2024-12-03T17:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with set analysis calculation of dates period set</title>
      <link>https://community.qlik.com/t5/App-Development/Issue-with-set-analysis-calculation-of-dates-period-set/m-p/2496008#M102621</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;There is a mistake in your formula, you forgot an r in quarter.&lt;/P&gt;
&lt;P&gt;You can use this formula:&lt;/P&gt;
&lt;P&gt;=Concat({&amp;lt;Day=, Week= ,Month=, Quarter=, Year=, OrderDateKey={"&amp;gt;$(=$(vComparedDateMin))&amp;lt;=$(=$(vComparedDateMax))"}&amp;gt;}OrderDate, ' ')&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this the result you want?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2024 14:55:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Issue-with-set-analysis-calculation-of-dates-period-set/m-p/2496008#M102621</guid>
      <dc:creator>Clement15</dc:creator>
      <dc:date>2024-12-04T14:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with set analysis calculation of dates period set</title>
      <link>https://community.qlik.com/t5/App-Development/Issue-with-set-analysis-calculation-of-dates-period-set/m-p/2496051#M102625</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/287708"&gt;@Clement15&lt;/a&gt;&amp;nbsp; You are totally right! A typo issue that costs me a lot of nerves. Thank you for brining light into this typo darkness.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2024 18:24:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Issue-with-set-analysis-calculation-of-dates-period-set/m-p/2496051#M102625</guid>
      <dc:creator>Peony</dc:creator>
      <dc:date>2024-12-04T18:24:14Z</dc:date>
    </item>
  </channel>
</rss>

