<?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: Calculation of max date and the date before in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Calculation-of-max-date-and-the-date-before/m-p/1944936#M77874</link>
    <description>&lt;P&gt;create variables in front end, not the script&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=ZORSYf45RNU" target="_blank"&gt;https://www.youtube.com/watch?v=ZORSYf45RNU&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Name : vMaxSnapshot&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Expression&lt;/P&gt;
&lt;P&gt;=Date(&lt;SPAN&gt;max(date#(SnapShotDate,'YYY-MM-DD')))&amp;nbsp; &lt;STRONG&gt;// with the leading equal sign&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Name : vPriorSnapshot&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Expression&lt;/P&gt;
&lt;P&gt;=Date(&lt;SPAN&gt;max(date#(SnapShotDate,'YYY-MM-DD'),2))&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;// with the leading equal sign&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Jun 2022 07:33:42 GMT</pubDate>
    <dc:creator>vinieme12</dc:creator>
    <dc:date>2022-06-17T07:33:42Z</dc:date>
    <item>
      <title>Calculation of max date and the date before</title>
      <link>https://community.qlik.com/t5/App-Development/Calculation-of-max-date-and-the-date-before/m-p/1944924#M77872</link>
      <description>&lt;P&gt;Hi everyone,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I´m just learning Qlik Sense and cannot find a solution in here for my problem. I&lt;/P&gt;
&lt;P&gt;n my data model I have a Snapshotdate where a snapshot of every budget day is included. Now I´m trying to calculate the change between the most current day and the day before. Therefore I tried to create a variable with max function.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example today is 2022-06-17, that means the last snapshot would be 2022-06-16 and the snapshot before 2022-06-13 because of public holiday.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I create two variable which let me calculate the change between these two days?&lt;/P&gt;
&lt;P&gt;My try was:&lt;/P&gt;
&lt;P&gt;LET vSnapshotDate =max(date#(SnapShotDate,'YYY-MM-DD'),0);&lt;/P&gt;
&lt;P&gt;LET vSnapshotDate =max(date#(SnapShotDate,'YYY-MM-DD'),1);&lt;/P&gt;
&lt;P&gt;It returns 'Null'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 06:55:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculation-of-max-date-and-the-date-before/m-p/1944924#M77872</guid>
      <dc:creator>JohannesBoehmer</dc:creator>
      <dc:date>2022-06-17T06:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation of max date and the date before</title>
      <link>https://community.qlik.com/t5/App-Development/Calculation-of-max-date-and-the-date-before/m-p/1944936#M77874</link>
      <description>&lt;P&gt;create variables in front end, not the script&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=ZORSYf45RNU" target="_blank"&gt;https://www.youtube.com/watch?v=ZORSYf45RNU&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Name : vMaxSnapshot&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Expression&lt;/P&gt;
&lt;P&gt;=Date(&lt;SPAN&gt;max(date#(SnapShotDate,'YYY-MM-DD')))&amp;nbsp; &lt;STRONG&gt;// with the leading equal sign&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Name : vPriorSnapshot&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Expression&lt;/P&gt;
&lt;P&gt;=Date(&lt;SPAN&gt;max(date#(SnapShotDate,'YYY-MM-DD'),2))&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;// with the leading equal sign&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 07:33:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculation-of-max-date-and-the-date-before/m-p/1944936#M77874</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2022-06-17T07:33:42Z</dc:date>
    </item>
  </channel>
</rss>

