<?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: min/max variable assignment in master calendar in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/min-max-variable-assignment-in-master-calendar/m-p/1607485#M736068</link>
    <description>&lt;P&gt;vDateName is literally taking the names from that table, but i need it to have the word 'Date' appended to the vDateName variable, as the field names all end in the word 'Date', e.g. 'Expiry Date'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i also tried this:&lt;/P&gt;&lt;P&gt;LET varMinDate = min([$(vDateName) Date]);&lt;BR /&gt;LET varMaxDate = max([$(vDateName) Date]);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but this still pulls through NULL. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jul 2019 12:35:26 GMT</pubDate>
    <dc:creator>anonymous1</dc:creator>
    <dc:date>2019-07-30T12:35:26Z</dc:date>
    <item>
      <title>min/max variable assignment in master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/min-max-variable-assignment-in-master-calendar/m-p/1607425#M736066</link>
      <description>&lt;P&gt;hey&lt;/P&gt;&lt;P&gt;i have created a loop to create a master calendar, with each of the date fields in a table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Calendar Fields is the name of the table for each data field.&amp;nbsp; Each date field ends with the word 'Date' so i removed this from the table to create a variable for the date field names, i.e. the fields are called Received Date, Completion Date, Expiry Date:&lt;/P&gt;&lt;P&gt;CalendarFields:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Date Field&lt;BR /&gt;Received&lt;BR /&gt;Completion&lt;BR /&gt;Expiry&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;//loop through all dates that require a calendar&lt;/P&gt;&lt;P&gt;FOR x = 0 TO NoOfRows('CalendarFields')-1&lt;/P&gt;&lt;P&gt;//Assign the current date field name to the variable&lt;BR /&gt;LET vDateName = PEEK('Date Field', $(x), 'CalendarFields');&lt;BR /&gt;&lt;BR /&gt;LET varMinDate = min([$(vDateName) Date]);&lt;BR /&gt;LET varMaxDate = max([$(vDateName) Date]);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i need the max and min values of the calendar to be the max and min values of that particular column, but the above min and max variable declarations are returning null.&amp;nbsp; does anyone have any advice as to how to get the max and min of each column by using the loop?&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:52:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/min-max-variable-assignment-in-master-calendar/m-p/1607425#M736066</guid>
      <dc:creator>anonymous1</dc:creator>
      <dc:date>2024-11-16T02:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: min/max variable assignment in master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/min-max-variable-assignment-in-master-calendar/m-p/1607475#M736067</link>
      <description>&lt;P&gt;May be just this?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;LET varMinDate = min($(vDateName));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LET varMaxDate = max($(vDateName));&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 12:25:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/min-max-variable-assignment-in-master-calendar/m-p/1607475#M736067</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2019-07-30T12:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: min/max variable assignment in master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/min-max-variable-assignment-in-master-calendar/m-p/1607485#M736068</link>
      <description>&lt;P&gt;vDateName is literally taking the names from that table, but i need it to have the word 'Date' appended to the vDateName variable, as the field names all end in the word 'Date', e.g. 'Expiry Date'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i also tried this:&lt;/P&gt;&lt;P&gt;LET varMinDate = min([$(vDateName) Date]);&lt;BR /&gt;LET varMaxDate = max([$(vDateName) Date]);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but this still pulls through NULL. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 12:35:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/min-max-variable-assignment-in-master-calendar/m-p/1607485#M736068</guid>
      <dc:creator>anonymous1</dc:creator>
      <dc:date>2019-07-30T12:35:26Z</dc:date>
    </item>
    <item>
      <title>Re: min/max variable assignment in master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/min-max-variable-assignment-in-master-calendar/m-p/1607489#M736069</link>
      <description>&lt;P&gt;Can you get little more, How you need for Min and Max. What is the expected?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 12:42:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/min-max-variable-assignment-in-master-calendar/m-p/1607489#M736069</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2019-07-30T12:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: min/max variable assignment in master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/min-max-variable-assignment-in-master-calendar/m-p/1607494#M736070</link>
      <description>&lt;P&gt;hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;im creating a master calendar so i need the max and min dates for each of the fields i wish to create a calendar on.&amp;nbsp; i need the min/max of each of the fields in the table with the name appended with the word 'Date'.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 12:46:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/min-max-variable-assignment-in-master-calendar/m-p/1607494#M736070</guid>
      <dc:creator>anonymous1</dc:creator>
      <dc:date>2019-07-30T12:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: min/max variable assignment in master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/min-max-variable-assignment-in-master-calendar/m-p/1607499#M736071</link>
      <description>&lt;P&gt;if the variable&amp;nbsp;vDateName is returning "Expiry", i don't understand why the following doesnt return the min and max Expiry Date.&lt;/P&gt;&lt;P&gt;LET varMinDate = min([$(vDateName) Date]);&lt;BR /&gt;LET varMaxDate = max([$(vDateName) Date]);&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 12:52:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/min-max-variable-assignment-in-master-calendar/m-p/1607499#M736071</guid>
      <dc:creator>anonymous1</dc:creator>
      <dc:date>2019-07-30T12:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: min/max variable assignment in master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/min-max-variable-assignment-in-master-calendar/m-p/1607509#M736072</link>
      <description>&lt;P&gt;This is not even Parameter analysis hence this won't work. I am sorry, I still didn't understand your intention?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 12:57:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/min-max-variable-assignment-in-master-calendar/m-p/1607509#M736072</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2019-07-30T12:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: min/max variable assignment in master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/min-max-variable-assignment-in-master-calendar/m-p/1614950#M736073</link>
      <description>&lt;P&gt;Natasha, I suspect you may need more than one calendar in this use case, see the following Design Blog post:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/Canonical-Date/ba-p/1463578" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/Canonical-Date/ba-p/1463578&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2019 15:14:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/min-max-variable-assignment-in-master-calendar/m-p/1614950#M736073</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2019-08-21T15:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: min/max variable assignment in master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/min-max-variable-assignment-in-master-calendar/m-p/1615331#M736074</link>
      <description>&lt;P&gt;Your approach couldn't work because with functions like peek() or fieldvalue() you could pick only a single value from a table respectively a field. If you need any kind of an evaluation of data you need a load-statement to create them and afterwards you may pick those values again, for example:&lt;/P&gt;&lt;P&gt;MinMaxTemp:&lt;BR /&gt;load num(max(fieldvalue('Date1', recno()))) as MaxTemp&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; num(min(fieldvalue('Date1, recno()))) as MinTemp&lt;BR /&gt;autogenerate fieldvaluecount('Date1');&lt;/P&gt;&lt;P&gt;load num(max(fieldvalue('Date2', recno()))) as MaxTemp&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; num(min(fieldvalue('Date2, recno()))) as MinTemp&lt;BR /&gt;autogenerate fieldvaluecount('Date2');&lt;/P&gt;&lt;P&gt;load num(max(fieldvalue('Date3', recno()))) as MaxTemp&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; num(min(fieldvalue('Date3, recno()))) as MinTemp&lt;BR /&gt;autogenerate fieldvaluecount('Date3');&lt;/P&gt;&lt;P&gt;MinMax:&lt;BR /&gt;load num(max(fieldvalue('MaxTemp', recno()))) as Max&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; num(min(fieldvalue('MinTemp, recno()))) as Min&lt;BR /&gt;autogenerate fieldvaluecount('Date3');&lt;/P&gt;&lt;P&gt;LET varMinDate = PEEK('Min', 0, 'MinMax');&lt;BR /&gt;LET varMaxDate = PEEK('Max', 0, 'MinMax');&lt;/P&gt;&lt;P&gt;drop tables MinMax, MinMaxTemp;&lt;/P&gt;&lt;P&gt;This example assumed that you don't need 3 different periods within the calendar(s). Furthermore I doubt that you need the above at all because quite usually you know already your earliest date-value and could set it fix and the latest date is often something like today() or maybe yearend(today()).&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2019 11:55:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/min-max-variable-assignment-in-master-calendar/m-p/1615331#M736074</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-08-22T11:55:48Z</dc:date>
    </item>
  </channel>
</rss>

