<?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 Creating a  Variable in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Creating-a-Variable/m-p/2125955#M91630</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;The following load script creates a table with dates ranging from 01/01/2019 (Minimum Date) till 31/08/2023 (Maximum Date):&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Let v_MinDate = Num('01/01/2023');&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Let v_MaxDate = Num('05/01/2023');&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Date:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Load&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Date($(v_MinDate) + (IterNo()-1)) as Date&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Autogenerate 1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;While $(v_MinDate) + (IterNo()-1) &amp;lt;= $(v_MaxDate);&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;In order not to manually change the &lt;STRONG&gt;maximum date&amp;nbsp;&lt;/STRONG&gt;&amp;nbsp;in the&amp;nbsp;&lt;STRONG&gt;v_MaxDate&lt;/STRONG&gt; in each consecutive month, i tried unsuccessfully&amp;nbsp; to modify the above script so it will be able to calculates the&amp;nbsp;&lt;STRONG&gt; maximum date&amp;nbsp;&lt;/STRONG&gt;dynamically based on the following Transaction Table:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sharbel_0-1696582069797.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/117777i85E0E4AA33EDC31C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sharbel_0-1696582069797.png" alt="Sharbel_0-1696582069797.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Any Ideas?&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Sharbel&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2024 21:21:20 GMT</pubDate>
    <dc:creator>Sharbel</dc:creator>
    <dc:date>2024-11-15T21:21:20Z</dc:date>
    <item>
      <title>Creating a  Variable</title>
      <link>https://community.qlik.com/t5/App-Development/Creating-a-Variable/m-p/2125955#M91630</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;The following load script creates a table with dates ranging from 01/01/2019 (Minimum Date) till 31/08/2023 (Maximum Date):&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Let v_MinDate = Num('01/01/2023');&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Let v_MaxDate = Num('05/01/2023');&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Date:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Load&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Date($(v_MinDate) + (IterNo()-1)) as Date&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Autogenerate 1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;While $(v_MinDate) + (IterNo()-1) &amp;lt;= $(v_MaxDate);&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;In order not to manually change the &lt;STRONG&gt;maximum date&amp;nbsp;&lt;/STRONG&gt;&amp;nbsp;in the&amp;nbsp;&lt;STRONG&gt;v_MaxDate&lt;/STRONG&gt; in each consecutive month, i tried unsuccessfully&amp;nbsp; to modify the above script so it will be able to calculates the&amp;nbsp;&lt;STRONG&gt; maximum date&amp;nbsp;&lt;/STRONG&gt;dynamically based on the following Transaction Table:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sharbel_0-1696582069797.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/117777i85E0E4AA33EDC31C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sharbel_0-1696582069797.png" alt="Sharbel_0-1696582069797.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Any Ideas?&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Sharbel&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 21:21:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Creating-a-Variable/m-p/2125955#M91630</guid>
      <dc:creator>Sharbel</dc:creator>
      <dc:date>2024-11-15T21:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a  Variable</title>
      <link>https://community.qlik.com/t5/App-Development/Creating-a-Variable/m-p/2126247#M91653</link>
      <description>&lt;P&gt;Hi, in case it helps I usually use a calendar that reads the values stored in the reference date field (quicker than read the data table) and creates all dates between the min and max values of that field:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LOAD 
  DateField  as Date,
;
LOAD 
  MinDate+ IterNo()-1  as DateField
While MinDate+ IterNo()-1 &amp;lt;= MaxDate
;
LOAD 
  Floor(Min(FieldValue('DateField', RecNo()))) as MinDate,
  Floor(Max(FieldValue('DateField', RecNo()))) as MaxDate
AutoGenerate FieldValueCount('DateField')
;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2023 06:51:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Creating-a-Variable/m-p/2126247#M91653</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2023-10-07T06:51:47Z</dc:date>
    </item>
  </channel>
</rss>

