<?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 Variable Help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variable-Help/m-p/341665#M126187</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to limit data is a table to data that is within a date range from another table. I have setup a min and max variable (minNote and maxNote) to hold the information. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET minNote='X';&lt;/P&gt;&lt;P&gt;SET maxNote='Y';&lt;/P&gt;&lt;P&gt;LET minNote=(Now()-(365*2));&lt;/P&gt;&lt;P&gt;LET maxNote=Now();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The initial LET statements default the data to something useful. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then load the source data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Qualify *;&lt;/P&gt;&lt;P&gt;HAgent:&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp; row_date&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;$(vAvayaCMSDataPath)HAGENT.qvd&lt;/P&gt;&lt;P&gt;(qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then try to set the variables up with the dynamic information:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET minNote=Min(HAgent.row_date);&lt;/P&gt;&lt;P&gt;LET maxNote=Max(HAgent.row_date);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But they end up blank... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally I query the end table:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;AFINotes:&lt;/P&gt;&lt;P&gt;LOAD AFI_NOTE_TEXT&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;$(vAFISystemDataPath)AFINote.qvd&lt;/P&gt;&lt;P&gt;(qvd) Where AFI_NOTE_EFF_DATE &amp;gt;= Date('$(minNote)') AND AFI_NOTE_EFF_DATE &amp;lt;= Date('$(maxNote)');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Functions if the following is commented out:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;LET minNote=Min(HAgent.row_date);&lt;/P&gt;&lt;P&gt;LET maxNote=Max(HAgent.row_date);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But pulls more data than I want. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I use information from one table to filter information from another on load?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 May 2012 13:38:07 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-05-08T13:38:07Z</dc:date>
    <item>
      <title>Variable Help</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Help/m-p/341665#M126187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to limit data is a table to data that is within a date range from another table. I have setup a min and max variable (minNote and maxNote) to hold the information. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET minNote='X';&lt;/P&gt;&lt;P&gt;SET maxNote='Y';&lt;/P&gt;&lt;P&gt;LET minNote=(Now()-(365*2));&lt;/P&gt;&lt;P&gt;LET maxNote=Now();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The initial LET statements default the data to something useful. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then load the source data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Qualify *;&lt;/P&gt;&lt;P&gt;HAgent:&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp; row_date&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;$(vAvayaCMSDataPath)HAGENT.qvd&lt;/P&gt;&lt;P&gt;(qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then try to set the variables up with the dynamic information:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET minNote=Min(HAgent.row_date);&lt;/P&gt;&lt;P&gt;LET maxNote=Max(HAgent.row_date);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But they end up blank... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally I query the end table:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;AFINotes:&lt;/P&gt;&lt;P&gt;LOAD AFI_NOTE_TEXT&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;$(vAFISystemDataPath)AFINote.qvd&lt;/P&gt;&lt;P&gt;(qvd) Where AFI_NOTE_EFF_DATE &amp;gt;= Date('$(minNote)') AND AFI_NOTE_EFF_DATE &amp;lt;= Date('$(maxNote)');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Functions if the following is commented out:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;LET minNote=Min(HAgent.row_date);&lt;/P&gt;&lt;P&gt;LET maxNote=Max(HAgent.row_date);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But pulls more data than I want. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I use information from one table to filter information from another on load?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 13:38:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Help/m-p/341665#M126187</guid>
      <dc:creator />
      <dc:date>2012-05-08T13:38:07Z</dc:date>
    </item>
    <item>
      <title>Variable Help</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Help/m-p/341666#M126188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Check this link.&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/210096"&gt;http://community.qlik.com/message/210096&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it solves your problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Celambarasan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 13:59:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Help/m-p/341666#M126188</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-05-08T13:59:00Z</dc:date>
    </item>
    <item>
      <title>Variable Help</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Help/m-p/341667#M126189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;functions Min() and Max() are aggregated functions and they can only be used in aggregated LOAD statements. You can't simply use them in the LET statement. In order to calculate the min/max date, you should follow those teps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. LOAD your data&lt;/P&gt;&lt;P&gt;2. Aggregate the data and claculate min/max:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; min(Date) as MinDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max(DAte) as MaxDate&lt;/P&gt;&lt;P&gt; RESIDENT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyData&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Use function PEEK() to retreive the field values and assign them to the variables:&lt;/P&gt;&lt;P&gt;LET vMinDate = peek('MinDate');&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice that when you apply functions like min, max, or any arithmetic operations, the result becomes numeric, as opposed to dual. You may need to format the results using function DATE() in order to restore the original date formatting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oleg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 14:22:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Help/m-p/341667#M126189</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2012-05-08T14:22:50Z</dc:date>
    </item>
    <item>
      <title>Variable Help</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Help/m-p/341668#M126190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's it. I replaced:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;LET minNote=Min(HAgent.row_date);&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;LET maxNote=Max(HAgent.row_date);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TmpMinAndMax:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Min(HAgent.row_date) as MinDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Max(HAgent.row_date) as MaxDate&lt;/P&gt;&lt;P&gt;RESIDENT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HAgent;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET minNote=Peek('TmpMinAndMax.MinDate');&lt;/P&gt;&lt;P&gt;LET maxNote=Peek('TmpMinAndMax.MaxDate');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table TmpMinAndMax;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and everything worked as expected. To the people out there less familiar with Qlikview; notice on the Peek function the requirement to provide the field name as a string (enclosed in apostrophes).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 14:50:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Help/m-p/341668#M126190</guid>
      <dc:creator />
      <dc:date>2012-05-08T14:50:44Z</dc:date>
    </item>
  </channel>
</rss>

