<?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: Add Date to Every EmpID in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1767031#M454337</link>
    <description>&lt;P&gt;We have a time entry model that we need to identify employees which have not entered time by day.&amp;nbsp; For example I have 13 employees in a profit center and only 10 of them have entered time on 01/01/2020.&amp;nbsp; The next day 9 people have entered time.&amp;nbsp; I need to identify by day who has yet to enter time.&amp;nbsp; I thought by adding a day for each employee and comparing it to the time entry table would be the easiest way.&amp;nbsp; I'm open for other ideas.&amp;nbsp; Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 08 Dec 2020 14:24:21 GMT</pubDate>
    <dc:creator>tmumaw</dc:creator>
    <dc:date>2020-12-08T14:24:21Z</dc:date>
    <item>
      <title>Add Date to Every EmpID</title>
      <link>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1766823#M454312</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have a table of employee IDs and I need to create an entry for each day of the year.&amp;nbsp; What's the best way to do this?&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;empID&amp;nbsp; 000001 then I need an entry for each day for this employee.&lt;/P&gt;&lt;P&gt;00001&amp;nbsp; Jan 1, 2020&lt;/P&gt;&lt;P&gt;00001&amp;nbsp; Jan 2, 2020&amp;nbsp; etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 23:29:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1766823#M454312</guid>
      <dc:creator>tmumaw</dc:creator>
      <dc:date>2024-11-15T23:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: Add Date to Every EmpID</title>
      <link>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1766849#M454313</link>
      <description>&lt;P&gt;iteration would be a good start:&lt;BR /&gt;&lt;BR /&gt;date(date('1/1/2020')+iterno()-1) as Date...&lt;BR /&gt;while iterno()&amp;lt;= SomeNumber&lt;/P&gt;&lt;P&gt;but i would ask what the purpose is.&amp;nbsp; if you already have a million rows iterating through them would multiple it by 365 for 1 year.&amp;nbsp; depending on the case, maybe leveraging the associative power of QV would work (like say building a link or bridge to the calendar).&lt;/P&gt;&lt;P&gt;so it depends on what you want to do with it.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2020 22:12:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1766849#M454313</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2020-12-07T22:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: Add Date to Every EmpID</title>
      <link>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1766851#M454314</link>
      <description>&lt;P&gt;i love using iterno() when building test data:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;load Plant, date(today()-iterno()+1) as Date, floor(rand()*1000) as Amount
while iterno()&amp;lt;=365;
load * inline [
Plant
P1
P2...];&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 07 Dec 2020 22:15:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1766851#M454314</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2020-12-07T22:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: Add Date to Every EmpID</title>
      <link>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1766866#M454315</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6448"&gt;@tmumaw&lt;/a&gt;&amp;nbsp; try below. You can change the start and end date variable according to your need.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Your actual data
Data:
load *,
     Emp_ID
FROM table;

let vStartDate = makedate(2020,1,1);
let vEndDate = today();

EmpID:
LOAD fieldvalue('Emp_ID',recno()) as Emp_ID
autgenerate fieldvaluecount('Emp_ID');

left join(EmpID)
LOAD $(vStartDate) + iterno()-1 as Date
autogenerate 1
while $(vStartDate) + iterno()-1 &amp;lt;= $(vEndDate);

left join(Data)
LOAD *
resident Emp_ID;

drop table Emp_ID;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2020 22:36:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1766866#M454315</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-12-07T22:36:40Z</dc:date>
    </item>
    <item>
      <title>Re: Add Date to Every EmpID</title>
      <link>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1766998#M454329</link>
      <description>&lt;P&gt;I get the message table EmpID not found.&amp;nbsp; Am I missing something?&lt;/P&gt;&lt;P&gt;Employees:&lt;BR /&gt;LOAD&lt;BR /&gt;"Employee Number" as ENo&lt;BR /&gt;FROM [lib://QVD/HR/Infotype0000.QVD] (qvd)&lt;BR /&gt;where Employment_STAT2= 3 and "End Date" = '12/31/9999'&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;let vStartDate = makedate(2020,1,1)&lt;BR /&gt;;&lt;BR /&gt;let vEndDate = today()&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;EmpID:&lt;BR /&gt;LOAD&lt;BR /&gt;fieldvalue('ENo',recno()) as ENo&lt;BR /&gt;autogenerate fieldvaluecount('ENo')&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;left join(EmpID)&lt;BR /&gt;LOAD $(vStartDate) + iterno()-1 as Date&lt;BR /&gt;autogenerate 1&lt;BR /&gt;while $(vStartDate) + iterno()-1 &amp;lt;= $(vEndDate)&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;left join(Employees)&lt;BR /&gt;LOAD *&lt;BR /&gt;resident EmpID;&lt;/P&gt;&lt;P&gt;drop table EmpID;&lt;/P&gt;&lt;P&gt;Exit Script;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 12:50:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1766998#M454329</guid>
      <dc:creator>tmumaw</dc:creator>
      <dc:date>2020-12-08T12:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Add Date to Every EmpID</title>
      <link>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1767018#M454332</link>
      <description>&lt;P&gt;add a noconcatenate prior to EmpID:&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 13:53:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1767018#M454332</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2020-12-08T13:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: Add Date to Every EmpID</title>
      <link>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1767022#M454333</link>
      <description>&lt;P&gt;also, your variables are text once evaluated as $(variable).&amp;nbsp; so adding a number to them results in just the added number, adjust your code&amp;nbsp; a little:&lt;BR /&gt;&lt;BR /&gt;LOAD date(date('$(vStartDate)') + iterno()-1) as Date&lt;BR /&gt;autogenerate 1&lt;BR /&gt;while date(date('$(vStartDate)') + iterno()-1) &amp;lt;= date('$(vEndDate)');&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 14:09:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1767022#M454333</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2020-12-08T14:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Add Date to Every EmpID</title>
      <link>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1767023#M454334</link>
      <description>&lt;P&gt;Edwin suggested adding Noconcatenate before EmpID which worked, however I'm only getting 1 record for each employee.&amp;nbsp; What I need is empid and a entry for every date between the 2 variables.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;000001&amp;nbsp; &amp;nbsp; &amp;nbsp;01/01/2020&lt;/P&gt;&lt;P&gt;000001&amp;nbsp; &amp;nbsp; &amp;nbsp;01/02/2020&lt;/P&gt;&lt;P&gt;etc.....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 14:09:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1767023#M454334</guid>
      <dc:creator>tmumaw</dc:creator>
      <dc:date>2020-12-08T14:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: Add Date to Every EmpID</title>
      <link>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1767025#M454335</link>
      <description>&lt;P&gt;as i said earlier, you actually multiplied your records by 365.&amp;nbsp; if you have 1M recs it will balloon to 365M.&amp;nbsp; what is the motivation to create dates for each emp?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 14:12:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1767025#M454335</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2020-12-08T14:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: Add Date to Every EmpID</title>
      <link>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1767031#M454337</link>
      <description>&lt;P&gt;We have a time entry model that we need to identify employees which have not entered time by day.&amp;nbsp; For example I have 13 employees in a profit center and only 10 of them have entered time on 01/01/2020.&amp;nbsp; The next day 9 people have entered time.&amp;nbsp; I need to identify by day who has yet to enter time.&amp;nbsp; I thought by adding a day for each employee and comparing it to the time entry table would be the easiest way.&amp;nbsp; I'm open for other ideas.&amp;nbsp; Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 14:24:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1767031#M454337</guid>
      <dc:creator>tmumaw</dc:creator>
      <dc:date>2020-12-08T14:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: Add Date to Every EmpID</title>
      <link>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1767054#M454339</link>
      <description>&lt;P&gt;i ran your code using made up emp ID and am able to generate the dates&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 15:51:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1767054#M454339</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2020-12-08T15:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: Add Date to Every EmpID</title>
      <link>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1767064#M454340</link>
      <description>&lt;P&gt;I get this message:&lt;/P&gt;&lt;P&gt;Table not found error&lt;/P&gt;&lt;P&gt;Table 'EmpID' not found&lt;/P&gt;&lt;P&gt;left join(EmpID)&lt;BR /&gt;LOAD date(date('1/1/2020') + iterno()-1) as Date&lt;BR /&gt;autogenerate 1&lt;BR /&gt;while date(date('1/1/2020') + iterno()-1) &amp;lt;= date('12/8/2020')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my script:&lt;/P&gt;&lt;P&gt;Employees:&lt;BR /&gt;LOAD&lt;BR /&gt;[Employee Number] as ENo&lt;BR /&gt;FROM&lt;BR /&gt;[D:\Qlikview\QVD\HR\Infotype0000.QVD] (qvd)&lt;BR /&gt;where Employment_STAT2= '3' and [End Date] = '12/31/9999'&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;EmpID:&lt;BR /&gt;LOAD&lt;BR /&gt;fieldvalue('ENo',recno()) as ENo&lt;BR /&gt;autogenerate fieldvaluecount('ENo')&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;left join(EmpID)&lt;BR /&gt;LOAD date(date('$(vStartDate)') + iterno()-1) as Date&lt;BR /&gt;autogenerate 1&lt;BR /&gt;while date(date('$(vStartDate)') + iterno()-1) &amp;lt;= date('$(vEndDate)');&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;left join(Employees)&lt;BR /&gt;LOAD *&lt;BR /&gt;resident EmpID;&lt;/P&gt;&lt;P&gt;drop table EmpID;&lt;BR /&gt;Exit Script;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 16:25:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1767064#M454340</guid>
      <dc:creator>tmumaw</dc:creator>
      <dc:date>2020-12-08T16:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: Add Date to Every EmpID</title>
      <link>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1767065#M454341</link>
      <description>&lt;P&gt;Ignore my message forgot the Noconcatinate&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 16:28:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1767065#M454341</guid>
      <dc:creator>tmumaw</dc:creator>
      <dc:date>2020-12-08T16:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: Add Date to Every EmpID</title>
      <link>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1767068#M454342</link>
      <description>&lt;P&gt;Thanks Edwin for all the help.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 16:41:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1767068#M454342</guid>
      <dc:creator>tmumaw</dc:creator>
      <dc:date>2020-12-08T16:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Add Date to Every EmpID</title>
      <link>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1767073#M454343</link>
      <description>&lt;P&gt;np, considering the dataset is small, i would just go with your solution which makes for a simpler expression -&amp;gt; easier to maintain.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 16:58:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-Date-to-Every-EmpID/m-p/1767073#M454343</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2020-12-08T16:58:52Z</dc:date>
    </item>
  </channel>
</rss>

