<?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 Networkdays parameters in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Networkdays-parameters/m-p/58729#M9759</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;I need some day treatment based on working centers and their calendars. So I use the Networkdays and try to send parameters via an Applymap(), as in the example code it follows:&lt;/P&gt;&lt;P&gt;&lt;EM style=": ; color: #3366ff; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;Holidays:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;Load * inline [&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;Center,Holidays&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;A,28/02/2017&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;A,01/03/2017&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;MapCenterHolidays:&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;Mapping&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;Load Center,&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;Concat(chr(39) &amp;amp; Holidays &amp;amp; chr(39),',')&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;Resident Holidays&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;group by Center;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;Facts:&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;Load Start_Date,&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;End_Date,&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;ApplyMap('MapCenterHolidays',Center,Null()) as Holidays,&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;NetWorkDays(Start_Date,End_Date) as DaysSpent,&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;NetWorkDays(Start_Date,End_Date,ApplyMap('MapCenterHolidays',Center,Null())) as DaysSpentHolidays;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;Load 'A' as Center,&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;Date(MakeDate(2017,2,27)) as Start_Date,&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;Date(MakeDate(2017,3,3)) as End_Date&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;AutoGenerate(1);&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style=": ; color: #3366ff; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;drop table Holidays;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for Center=A I have two holiday dates between Start_Date and End_Date. I create two fields, DaysSpent and DaysSpentHolidays, to compare both of them, but they are returning the same value both. I figured out it is because the parameter for holidays is not properly passed to the function.&lt;/P&gt;&lt;P&gt;I read about using variables for this purpose, but the working center amount and record number of this table doesn't advise doing any loop.&lt;/P&gt;&lt;P&gt;In the document, I can display this different measures:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Captura.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/205816_Captura.JPG" style="height: 124px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;Only last one is correct and you can see the formulas written to get each result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, my question is, is there any way to get this ApplyMap() send the correct parameters to the Networkdays() function? Is it a formatting issue or am I doing a wrong use of this function combination?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!!&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Jun 2018 22:19:30 GMT</pubDate>
    <dc:creator>m_baroja</dc:creator>
    <dc:date>2018-06-20T22:19:30Z</dc:date>
    <item>
      <title>Networkdays parameters</title>
      <link>https://community.qlik.com/t5/QlikView/Networkdays-parameters/m-p/58729#M9759</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;I need some day treatment based on working centers and their calendars. So I use the Networkdays and try to send parameters via an Applymap(), as in the example code it follows:&lt;/P&gt;&lt;P&gt;&lt;EM style=": ; color: #3366ff; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;Holidays:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;Load * inline [&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;Center,Holidays&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;A,28/02/2017&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;A,01/03/2017&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;MapCenterHolidays:&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;Mapping&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;Load Center,&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;Concat(chr(39) &amp;amp; Holidays &amp;amp; chr(39),',')&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;Resident Holidays&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;group by Center;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;Facts:&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;Load Start_Date,&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;End_Date,&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;ApplyMap('MapCenterHolidays',Center,Null()) as Holidays,&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;NetWorkDays(Start_Date,End_Date) as DaysSpent,&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;NetWorkDays(Start_Date,End_Date,ApplyMap('MapCenterHolidays',Center,Null())) as DaysSpentHolidays;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;Load 'A' as Center,&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;Date(MakeDate(2017,2,27)) as Start_Date,&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;Date(MakeDate(2017,3,3)) as End_Date&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;AutoGenerate(1);&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #3366ff;"&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style=": ; color: #3366ff; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;drop table Holidays;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for Center=A I have two holiday dates between Start_Date and End_Date. I create two fields, DaysSpent and DaysSpentHolidays, to compare both of them, but they are returning the same value both. I figured out it is because the parameter for holidays is not properly passed to the function.&lt;/P&gt;&lt;P&gt;I read about using variables for this purpose, but the working center amount and record number of this table doesn't advise doing any loop.&lt;/P&gt;&lt;P&gt;In the document, I can display this different measures:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Captura.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/205816_Captura.JPG" style="height: 124px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;Only last one is correct and you can see the formulas written to get each result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, my question is, is there any way to get this ApplyMap() send the correct parameters to the Networkdays() function? Is it a formatting issue or am I doing a wrong use of this function combination?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!!&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2018 22:19:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Networkdays-parameters/m-p/58729#M9759</guid>
      <dc:creator>m_baroja</dc:creator>
      <dc:date>2018-06-20T22:19:30Z</dc:date>
    </item>
  </channel>
</rss>

