<?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: Logic Help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Logic-Help/m-p/1085778#M924951</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abhay,&lt;/P&gt;&lt;P&gt;You need to use peek() function while assigning the max(Date) to your variable.&lt;/P&gt;&lt;P&gt;Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load max(Date) as MaxDate resident &amp;lt;Your table name&amp;gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LET vMaxDate = Peek('MaxDate', '0', 'Table1');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Hope this will help.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 09 Apr 2016 10:42:32 GMT</pubDate>
    <dc:creator>pavan045</dc:creator>
    <dc:date>2016-04-09T10:42:32Z</dc:date>
    <item>
      <title>Logic Help</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Help/m-p/1085776#M924949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Guys ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need one simple help,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have one table in which continuous dates are available ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to pick max of date at backend it self&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load Date&lt;/P&gt;&lt;P&gt;from Path;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vMaxDate = max(Date);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it is not giving output to me ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to use this variable in other table;&lt;/P&gt;&lt;P&gt;load &lt;/P&gt;&lt;P&gt;(vMaxDate - DueDate)&amp;nbsp;&amp;nbsp; as Days&lt;/P&gt;&lt;P&gt;from Table;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How i can achieve this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Help/m-p/1085776#M924949</guid>
      <dc:creator>abhaysingh</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Logic Help</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Help/m-p/1085777#M924950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do it like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SET DateFormat = 'MM/DD/YYYY'; // Adapt to your Date date format&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;TMP:&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;Load Max(Date) as MaxDate&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;from Path;&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;Let vMaxDate = Peek('MaxDate',0,'TMP');&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Apr 2016 10:27:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Help/m-p/1085777#M924950</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-09T10:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: Logic Help</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Help/m-p/1085778#M924951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abhay,&lt;/P&gt;&lt;P&gt;You need to use peek() function while assigning the max(Date) to your variable.&lt;/P&gt;&lt;P&gt;Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load max(Date) as MaxDate resident &amp;lt;Your table name&amp;gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LET vMaxDate = Peek('MaxDate', '0', 'Table1');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Hope this will help.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Apr 2016 10:42:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Help/m-p/1085778#M924951</guid>
      <dc:creator>pavan045</dc:creator>
      <dc:date>2016-04-09T10:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: Logic Help</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Help/m-p/1085779#M924952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a sample sample to show how Stefan's idea will work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Dates:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Date(MakeDate(2014, 12, 31) + RecNo()) as Date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AutoGenerate 300;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MaxDate:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Max(Date) as MaxDate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Dates;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LET vMaxDate = Peek('MaxDate');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table MaxDate;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FactTable:&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;&amp;nbsp; $(vMaxDate) - DueDate as Days;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Dim, DueDate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A, 06/03/2015&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;B, 03/13/2015&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;C, 02/25/2015&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/121109_Capture.PNG" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Apr 2016 14:56:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Help/m-p/1085779#M924952</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-09T14:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: Logic Help</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Help/m-p/1085780#M924953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And to explain it some more:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use aggregation functions like Max() only in a table LOAD.&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/AggregationFunctions/aggregation-functions.htm" title="http://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/AggregationFunctions/aggregation-functions.htm"&gt;Aggregation functions ‒ QlikView&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can then access the aggregated values, like the MaxDate in a variable assignment by the use of inter record functions like Peek()&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/InterRecordFunctions/Peek.htm?q=peek" title="http://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/InterRecordFunctions/Peek.htm?q=peek"&gt;Peek ‒ QlikView&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you then want to use the variable in another LOAD statement, you need to use dollar sign expansion of your variable:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/dollar-sign-expansion-using-variable.htm" title="http://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/dollar-sign-expansion-using-variable.htm"&gt;Dollar-sign expansion using a variable ‒ QlikView&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Apr 2016 15:47:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Help/m-p/1085780#M924953</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-09T15:47:53Z</dc:date>
    </item>
  </channel>
</rss>

