<?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: Variable help.. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variable-help/m-p/388016#M144786</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class="replyToName" style="font-size: 14px;"&gt;Gysbert,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName" style="font-size: 14px;"&gt;thanks for your reply.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName" style="font-size: 14px;"&gt;In your example, the vAbsentDays only need to include dates where the &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt; 'Diary Event Type code' is either 01,02,03,13. that is where i am stuck at. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Is it possible for you to put it into my sample? its easier for me to understand that way if its not too much trouble &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName" style="font-size: 14px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Mar 2013 13:17:12 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-03-25T13:17:12Z</dc:date>
    <item>
      <title>Variable help..</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-help/m-p/388014#M144784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need help with a variable...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached a sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is what i need to achieve. &lt;/P&gt;&lt;P&gt;1. I need a variable which contains Public holiday dates&lt;/P&gt;&lt;P&gt;2. i need a variable that contains employee sickness / holiday / training dates.&lt;/P&gt;&lt;P&gt;3. then i need to add these 2 varibables to a variable that calculates 'Days in Range' which is then used to work out averages. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ok, i have completed point 1 (public holidays variable)&lt;/P&gt;&lt;P&gt;i dont know how to create the 2nd variable. i need it to contain the following 'Diary Event Type codes'..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01, (holiday)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 02, (Sickness)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 03, (Other)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13, (Field Day ISS) - Training. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a variable 'vDaysinRange' which works out the working day range. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i want to add in the vBankHolidays and the new variable from point 2 (both to be excluded) into 'vDaysinRange' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anyone help please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2013 12:38:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-help/m-p/388014#M144784</guid>
      <dc:creator />
      <dc:date>2013-03-25T12:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Variable help..</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-help/m-p/388015#M144785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PublicHolidays:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #800000;"&gt;//&amp;nbsp; concat(chr(39)&amp;amp;date(HolidayDate)&amp;amp;chr(39),',') AS PublicHol&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp; concat(distinct num(HolidayDate),',') AS PublicHol&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;FROM comm75724.xls&lt;/P&gt;&lt;P&gt;(biff, embedded labels, table is [BankHol$]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//create variable containing public holiday dates&amp;nbsp; &lt;/P&gt;&lt;P&gt;LET vBankHolidays = peek('PublicHol',0,'PublicHolidays');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AbsentDays:&lt;/P&gt;&lt;P&gt;load concat(distinct AbsentDay, ',') as AbsentDays;&lt;/P&gt;&lt;P&gt;load DiaryEventDateFrom + iterno() -1 as AbsentDay&lt;/P&gt;&lt;P&gt;while DiaryEventDateFrom + iterno() -1 &amp;lt;= DiaryEventDateTo;&lt;/P&gt;&lt;P&gt;Load DiaryEventDateFrom, DiaryEventDateTo from &lt;/P&gt;&lt;P&gt;comm75724.xls&lt;/P&gt;&lt;P&gt;(biff, embedded labels, table is [DiaryEvent$])&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;where match(DiaryEventTypeCode,'01','02','03','13');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vAbsentDays = peek('AbsentDays');&lt;/P&gt;&lt;P&gt;SET vAbsentDays2 = $(vBankHolidays),$(vAbsentDays);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET vDaysinRange = networkdays(vMinDate,vMaxDate,$(vAbsentDays2));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;edit: highlighted the where clause for DiaryEventTypeCode)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;edit 2: highlighted the changes to the PublicHolidays load&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2013 13:10:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-help/m-p/388015#M144785</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-03-25T13:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Variable help..</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-help/m-p/388016#M144786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class="replyToName" style="font-size: 14px;"&gt;Gysbert,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName" style="font-size: 14px;"&gt;thanks for your reply.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName" style="font-size: 14px;"&gt;In your example, the vAbsentDays only need to include dates where the &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt; 'Diary Event Type code' is either 01,02,03,13. that is where i am stuck at. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Is it possible for you to put it into my sample? its easier for me to understand that way if its not too much trouble &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName" style="font-size: 14px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2013 13:17:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-help/m-p/388016#M144786</guid>
      <dc:creator />
      <dc:date>2013-03-25T13:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: Variable help..</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-help/m-p/388017#M144787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;SPAN class="replyToName" style="font-size: 14px;"&gt;Gysbert &lt;/SPAN&gt;, yes i see that now, sorry, i completely over looked it!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i cant seem to get the DATE function to work on the new field in your example. the vAbsent Days variable is displaying a mixture of formats. &lt;/P&gt;&lt;P&gt;Can you point me in the right direction to format this field please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2013 14:13:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-help/m-p/388017#M144787</guid>
      <dc:creator />
      <dc:date>2013-03-25T14:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Variable help..</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-help/m-p/388018#M144788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This doesnt seem to be working...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This month for example has 21 working days in it (thats if no employees have no time off) but looking at the new sample i have attached, every employee has 21 days against them. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;employee code 201&amp;nbsp; has had 4 days off sick this month so the daysin range for them should be 17 not 21. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the variable EXCLUDING the dates in the vAbsentDays2 variable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2013 15:11:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-help/m-p/388018#M144788</guid>
      <dc:creator />
      <dc:date>2013-03-25T15:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Variable help..</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-help/m-p/388019#M144789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, you need it per employee. Different approach then with a very simple flag field. See attached qvw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;edit: SET vDaysinRange = networkdays(vMinDate,vMaxDate,$(vBankHolidays)) - count({&amp;lt;DiaryEventTypeCode={'01','02','03','13'}&amp;gt;} total &amp;lt;DiaryEventEmployeeCode&amp;gt; DiaryEventEmployeeCode);&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2013 15:33:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-help/m-p/388019#M144789</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-03-25T15:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Variable help..</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-help/m-p/388020#M144790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thats great, sorry i should have said that in the beginning..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One other question though...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to get the solution in a variable?&lt;/P&gt;&lt;P&gt;The application this needs to go in is already in use and uses the variable 'DaysInRange' which currently only works out working days. They want it changed to deduct Bank Holidays and Absence too, so i would like to just update the variable otherwise it would mean changing the set analysis in loads of expressions across the whole app..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2013 16:07:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-help/m-p/388020#M144790</guid>
      <dc:creator />
      <dc:date>2013-03-25T16:07:00Z</dc:date>
    </item>
  </channel>
</rss>

