<?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: Date function - I have a cw and I need a date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-function-I-have-a-cw-and-I-need-a-date/m-p/805263#M663906</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't quite understand the background of this which is kind of annoying - but I do understand why it works one way and not another.&lt;/P&gt;&lt;P&gt;What you suggest was just my thought actually - I was thinking about adapting the date_format, but I settled on using numeric values instead.&lt;/P&gt;&lt;P&gt;So I constructed that date using num(MAKEDATE()) and I now have the filter just like your second proposal - without the num() around it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Feb 2015 08:40:34 GMT</pubDate>
    <dc:creator>datanibbler</dc:creator>
    <dc:date>2015-02-03T08:40:34Z</dc:date>
    <item>
      <title>Date function - I have a cw and I need a date</title>
      <link>https://community.qlik.com/t5/QlikView/Date-function-I-have-a-cw-and-I-need-a-date/m-p/805254#M663897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the requirement of adding to a table where I have, for every day, a number of "man-hours" in the early shift and one in the late shift.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To that, I need to add from a second table (derived from the personnel-plans of which there are 2 for each week (one for early shift, one for late shift) - in that, I have a year (derived from the file_name) and a calendar_week (and a shift).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&amp;gt; Now I have to "pump up" that second table so that I can add its contents to those of the first - I need to generate all five working_days of a calendar_week out of the same (cw).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody give me a hint how to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: I think I know a way, even if it's maybe not the most elegant/ slim one: I have a master_calendar - the code is in a qvs_file as it's used everywhere - where I have both the cw and the date. So I can use that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2015 09:54:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-function-I-have-a-cw-and-I-need-a-date/m-p/805254#M663897</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2015-02-02T09:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Date function - I have a cw and I need a date</title>
      <link>https://community.qlik.com/t5/QlikView/Date-function-I-have-a-cw-and-I-need-a-date/m-p/805255#M663898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi DataNibbler,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t1:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; makeweekdate(Year, Week, iterno() - 1) as Date, Value&lt;/P&gt;&lt;P&gt;From xyz&lt;/P&gt;&lt;P&gt;While iterno() &amp;lt; 5;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2015 10:12:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-function-I-have-a-cw-and-I-need-a-date/m-p/805255#M663898</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-02-02T10:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: Date function - I have a cw and I need a date</title>
      <link>https://community.qlik.com/t5/QlikView/Date-function-I-have-a-cw-and-I-need-a-date/m-p/805256#M663899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;many thanks!&lt;/P&gt;&lt;P&gt;I didn't know this function. I have been through all the Date-and-Time-functions several times before (which are, in my outdated version of QlikView, all on one page in the help_file), but I have never really noticed that one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2015 10:29:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-function-I-have-a-cw-and-I-need-a-date/m-p/805256#M663899</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2015-02-02T10:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Date function - I have a cw and I need a date</title>
      <link>https://community.qlik.com/t5/QlikView/Date-function-I-have-a-cw-and-I-need-a-date/m-p/805257#M663900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I seem to have some issue here:&lt;/P&gt;&lt;P&gt;- I have used that code quite exactly like you posted it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tage generieren:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Makeweekdate(Jahr_StSt_WE, KW_StSt_WE, iterno()-1) as Datum_StSt_WE&lt;/P&gt;&lt;P&gt;RESIDENT Staplerfahrer_WE&lt;/P&gt;&lt;P&gt;WHILE iterno() &amp;lt; 5;&lt;/P&gt;&lt;P&gt;(that should be &amp;lt;=5, I just notice)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is, I load RESIDENT from the table I have generated out of the personnel_plans - but in that, I have about 20 lines per cw - 2 shifts, several employees of course - so by doing this RESIDENT, I get 4 workdays for every line in that table, not only for every cw.&lt;/P&gt;&lt;P&gt;Is there any way round this without creating a temporary aggregated table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: OK, I'll just squeeze in a &amp;gt;&amp;gt; LOAD DISTINCT &amp;lt;&amp;lt; with just those two fields, run that little code and drop that temp_table again. Then my figures should line up. Every cw should then be joined with 5 records, so I should end up with (700*5) = 3.500 records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.P.S.: ... and I do. Hurray!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2015 11:18:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-function-I-have-a-cw-and-I-need-a-date/m-p/805257#M663900</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2015-02-02T11:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Date function - I have a cw and I need a date</title>
      <link>https://community.qlik.com/t5/QlikView/Date-function-I-have-a-cw-and-I-need-a-date/m-p/805258#M663901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using :&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;makeweekdate(Year, Week, iterno() - 1) as NewDate, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Value&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;From abcd&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;While iterno() &amp;lt;= 5;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Regards,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Snehal Nabar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2015 11:28:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-function-I-have-a-cw-and-I-need-a-date/m-p/805258#M663901</guid>
      <dc:creator />
      <dc:date>2015-02-02T11:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: Date function - I have a cw and I need a date</title>
      <link>https://community.qlik.com/t5/QlikView/Date-function-I-have-a-cw-and-I-need-a-date/m-p/805259#M663902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi DataNibbler,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it's difficult to say which way might be the best. Maybe a loop outside which runs through the shifts or you reduced your table before the while-load and then extend this again per joining or mapping - but I don't think it would be easier or save time as to use a temporary aggregated table - sometimes it's good to be pragmatic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2015 11:44:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-function-I-have-a-cw-and-I-need-a-date/m-p/805259#M663902</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-02-02T11:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Date function - I have a cw and I need a date</title>
      <link>https://community.qlik.com/t5/QlikView/Date-function-I-have-a-cw-and-I-need-a-date/m-p/805260#M663903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;well, it works, so I'm happy for the moment.&lt;/P&gt;&lt;P&gt;Now I have quite another issue:&lt;/P&gt;&lt;P&gt;That same code, which works fine, in one of my apps, suddenly seems to not work when I copy it into one of our main data_loading apps. That's very strange. The file_paths can't be it anymore, I have already made them all explicit - no relative paths anymore.&lt;/P&gt;&lt;P&gt;Anyway, this one is solved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2015 11:47:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-function-I-have-a-cw-and-I-need-a-date/m-p/805260#M663903</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2015-02-02T11:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: Date function - I have a cw and I need a date</title>
      <link>https://community.qlik.com/t5/QlikView/Date-function-I-have-a-cw-and-I-need-a-date/m-p/805261#M663904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;somehow I can't quite get behind this:&lt;/P&gt;&lt;P&gt;There is a date_filter in a LOAD (in a FOR EACH loop) that should actually load 2 Excel_files.&lt;/P&gt;&lt;P&gt;In one of my apps, that works fine. In the other, that LOAD returns 0 lines - when I remove the date_filter, it returns 2, so that is the problem all right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The filter looks like this:&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; &lt;STRONG&gt;WHERE Date(Floor(Filletime()), 'DD.MM.YYYY') &amp;gt; '30.05.2014'&lt;/STRONG&gt; &amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The difference is obvious: In the app where it works, the date_format (on the "Main" tab) is set to 'DD.MM.YYYY'; In the other (where it doesn't work), it is set to 'DD/MM/YYYY'&lt;/P&gt;&lt;P&gt;&amp;lt;=&amp;gt; but isn't that only a display_format for the GUI? Isn't a date (or timestamp as it is here) always stored in numeric format?&lt;/P&gt;&lt;P&gt;Alternatively, I could just use the numeric value.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 08:11:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-function-I-have-a-cw-and-I-need-a-date/m-p/805261#M663904</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2015-02-03T08:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: Date function - I have a cw and I need a date</title>
      <link>https://community.qlik.com/t5/QlikView/Date-function-I-have-a-cw-and-I-need-a-date/m-p/805262#M663905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the reason is the default date-format in this app which don't led to a numeric interpretation from '30.05.2014' and therefore the where-clause will fail, try it instead with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WHERE Date(Floor(Filletime()), 'DD/MM/YYYY') &amp;gt; '30/05/2014'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or use directly numeric conditions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WHERE num(Floor(Filletime())) &amp;gt;41789&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;whereby the format-functions by default-formats or numeric functions like max() or floor() shouldn't be necessary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 08:27:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-function-I-have-a-cw-and-I-need-a-date/m-p/805262#M663905</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-02-03T08:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: Date function - I have a cw and I need a date</title>
      <link>https://community.qlik.com/t5/QlikView/Date-function-I-have-a-cw-and-I-need-a-date/m-p/805263#M663906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't quite understand the background of this which is kind of annoying - but I do understand why it works one way and not another.&lt;/P&gt;&lt;P&gt;What you suggest was just my thought actually - I was thinking about adapting the date_format, but I settled on using numeric values instead.&lt;/P&gt;&lt;P&gt;So I constructed that date using num(MAKEDATE()) and I now have the filter just like your second proposal - without the num() around it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 08:40:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-function-I-have-a-cw-and-I-need-a-date/m-p/805263#M663906</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2015-02-03T08:40:34Z</dc:date>
    </item>
  </channel>
</rss>

