<?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: Limit Load based on date and Sort results in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Limit-Load-based-on-date-and-Sort-results/m-p/92885#M752994</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1- Where did you try applying the where clause? 2 options to achive what you want&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a) use where clause in a preceding load not directly from excel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b) Load directly from excel into a temp table and resident load with where clause&lt;/P&gt;&lt;P&gt;2- Not sure what you mean. Subfield is a text function but i think you already know that. Whats the value in your&amp;nbsp; [Transcript Completed Date], &lt;/P&gt;&lt;P&gt;check below for ideas for some of your fields&lt;/P&gt;&lt;P&gt;&lt;A href="http://qlikviewcookbook.com/2015/05/better-calendar-scripts/" title="http://qlikviewcookbook.com/2015/05/better-calendar-scripts/"&gt;Better Calendar Scripts | Qlikview Cookbook&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wrt Quarter to date, month to date etc. what are you trying to achieve? i would use set analysis or &lt;A href="https://community.qlik.com/qlik-blogpost/4531"&gt;The As-Of Table&lt;/A&gt; to achieve what i think you want&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Oct 2018 20:37:40 GMT</pubDate>
    <dc:creator>dplr-rn</dc:creator>
    <dc:date>2018-10-30T20:37:40Z</dc:date>
    <item>
      <title>Limit Load based on date and Sort results</title>
      <link>https://community.qlik.com/t5/QlikView/Limit-Load-based-on-date-and-Sort-results/m-p/92884#M752993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is kind of a two part question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I have tried limiting my load statement based on results having a completion date &amp;gt;= 5/21/2016. I can not figure out the syntax of the where statement and I am not sure a where statement is the correct option. Blow is my script I removed the where statement.&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_15409288652498304" jivemacro_uid="_15409288652498304" modifiedtitle="true"&gt;
&lt;P&gt;LOAD [User ID] as AGT_6,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [User Full Name],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Role,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [User Email],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [User Orig. Hire Date],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Training Object ID],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Training Title],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Training Type],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Transcript Status],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Transcript Completed Date],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATE(Subfield([Transcript Completed Date],' ',1), 'MM/DD/YYYY') as Trans_DATE,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NUM(Subfield([Transcript Completed Date],' ',1))&amp;nbsp; AS Trans_DATENUM, &lt;/P&gt;
&lt;P&gt;NUM(Subfield([Transcript Completed Date],' ',1)) - YEARSTART(NUM(Subfield([Transcript Completed Date],' ',1))) + 1 AS Trans_DAYINYEAR,&lt;/P&gt;
&lt;P&gt;DAY(NUM(Subfield([Transcript Completed Date],' ',1))) AS Trans_DAYOFMONTH,&lt;/P&gt;
&lt;P&gt;WEEKDAY(NUM(Subfield([Transcript Completed Date],' ',1))) AS Trans_DAYNAME, &lt;/P&gt;
&lt;P&gt;WEEK(NUM(Subfield([Transcript Completed Date],' ',1))) AS Trans_WEEK,&lt;/P&gt;
&lt;P&gt;MONTH(NUM(Subfield([Transcript Completed Date],' ',1))) AS Trans_MONTHNAME,&amp;nbsp; &lt;/P&gt;
&lt;P&gt;YEAR(NUM(Subfield([Transcript Completed Date],' ',1))) AS Trans_YEAR, &lt;/P&gt;
&lt;P&gt;MONTHNAME(NUM(Subfield([Transcript Completed Date],' ',1))) AS Trans_MONTHYEAR, &lt;/P&gt;
&lt;P&gt;WEEKSTART(NUM(Subfield([Transcript Completed Date],' ',1))) AS Trans_WEEKSTART,&lt;/P&gt;
&lt;P&gt;WEEKDAY(NUM(Subfield([Transcript Completed Date],' ',1))) AS Trans_WEEKDAY&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;FROM&lt;/P&gt;
&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;
&lt;P&gt;(txt, utf8, embedded labels, delimiter is ',', msq);&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Also, I already have year, month, day, etc... Is it possible to use subfield to get these additional fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Quarter (Q1, Q2, Q3, Q4)&lt;/P&gt;&lt;P&gt;Year to Date&lt;/P&gt;&lt;P&gt;Quarter to Date&lt;/P&gt;&lt;P&gt;Month to Date&lt;/P&gt;&lt;P&gt;Last Month&lt;/P&gt;&lt;P&gt;Last Week&lt;/P&gt;&lt;P&gt;Previous Day&lt;/P&gt;&lt;P&gt;Today&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/Limit-Load-based-on-date-and-Sort-results/m-p/92884#M752993</guid>
      <dc:creator>mwscott1</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Limit Load based on date and Sort results</title>
      <link>https://community.qlik.com/t5/QlikView/Limit-Load-based-on-date-and-Sort-results/m-p/92885#M752994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1- Where did you try applying the where clause? 2 options to achive what you want&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a) use where clause in a preceding load not directly from excel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b) Load directly from excel into a temp table and resident load with where clause&lt;/P&gt;&lt;P&gt;2- Not sure what you mean. Subfield is a text function but i think you already know that. Whats the value in your&amp;nbsp; [Transcript Completed Date], &lt;/P&gt;&lt;P&gt;check below for ideas for some of your fields&lt;/P&gt;&lt;P&gt;&lt;A href="http://qlikviewcookbook.com/2015/05/better-calendar-scripts/" title="http://qlikviewcookbook.com/2015/05/better-calendar-scripts/"&gt;Better Calendar Scripts | Qlikview Cookbook&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wrt Quarter to date, month to date etc. what are you trying to achieve? i would use set analysis or &lt;A href="https://community.qlik.com/qlik-blogpost/4531"&gt;The As-Of Table&lt;/A&gt; to achieve what i think you want&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2018 20:37:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Limit-Load-based-on-date-and-Sort-results/m-p/92885#M752994</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2018-10-30T20:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: Limit Load based on date and Sort results</title>
      <link>https://community.qlik.com/t5/QlikView/Limit-Load-based-on-date-and-Sort-results/m-p/92886#M752995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the QilikView CookBook link. I am trying to use the code the author provided and I am getting an error at the Get min/max section.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Training:&lt;/P&gt;&lt;P&gt;LOAD [User ID] as AGT_6,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [User Full Name], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Role,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [User Email], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [User Orig. Hire Date],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Training Object ID],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Training Title], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Training Type], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Transcript Status],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Transcript Completed Date]&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;(txt, utf8, embedded labels, delimiter is ',', msq);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//WHERE [Transcript Completed Date] &amp;gt;= '05/21/2016';&lt;/P&gt;&lt;P&gt;//WHERE MATCH(Role,'ADM','ASR','DDM','DGA','PAM','PSM','PSR');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MasterCalendar: &lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt; TempDate AS [Transcript Completed Date], &lt;/P&gt;&lt;P&gt; week(TempDate) As Week, &lt;/P&gt;&lt;P&gt; Year(TempDate) As Year, &lt;/P&gt;&lt;P&gt; Month(TempDate) As Month, &lt;/P&gt;&lt;P&gt; Day(TempDate) As Day, &lt;/P&gt;&lt;P&gt; 'Q' &amp;amp; ceil(month(TempDate) / 3) AS Quarter, &lt;/P&gt;&lt;P&gt; Week(weekstart(TempDate)) &amp;amp; '-' &amp;amp; WeekYear(TempDate) as WeekYear, &lt;/P&gt;&lt;P&gt; WeekDay(TempDate) as WeekDay &lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//=== Generate a temp table of dates === &lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt; date(mindate + IterNo()) AS TempDate&lt;/P&gt;&lt;P&gt; ,maxdate // Used in InYearToDate() above, but not kept &lt;/P&gt;&lt;P&gt;WHILE mindate + IterNo() &amp;lt;= maxdate;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//=== Get min/max dates from Field ===/&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt; min(FieldValue('[Transcript Completed Date]', recno()))-1 as mindate,&lt;/P&gt;&lt;P&gt; max(FieldValue('[Transcript Completed Date]', recno())) as maxdate&lt;/P&gt;&lt;P&gt;AUTOGENERATE FieldValueCount('[Transcript Completed Date]');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2018 16:46:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Limit-Load-based-on-date-and-Sort-results/m-p/92886#M752995</guid>
      <dc:creator>mwscott1</dc:creator>
      <dc:date>2018-10-31T16:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Limit Load based on date and Sort results</title>
      <link>https://community.qlik.com/t5/QlikView/Limit-Load-based-on-date-and-Sort-results/m-p/92887#M752996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Remove the []s in the fieldvalue call&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2018 17:14:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Limit-Load-based-on-date-and-Sort-results/m-p/92887#M752996</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2018-10-31T17:14:26Z</dc:date>
    </item>
  </channel>
</rss>

