<?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: Exists in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Exists/m-p/340027#M125516</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As suggested by Oleg, the application works with the Exists function also.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Jul 2012 02:58:13 GMT</pubDate>
    <dc:creator>nagaiank</dc:creator>
    <dc:date>2012-07-09T02:58:13Z</dc:date>
    <item>
      <title>Exists</title>
      <link>https://community.qlik.com/t5/QlikView/Exists/m-p/340020#M125509</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 was using the below statement to find the holiday.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If &lt;SPAN style="font-size: 8pt;"&gt;((&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;WeekDay&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TempDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)='Sat' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;WeekDay&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TempDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)='Sun'),1,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;If&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Exists&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Holidays&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TempDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),2,3)) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Holiday.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;In One QVW file it is working fine and in the other QVW file it is not throwing error but not considering the holidays. is there any additional settings has to be changed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jul 2012 21:41:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exists/m-p/340020#M125509</guid>
      <dc:creator>brindlogcool</dc:creator>
      <dc:date>2012-07-08T21:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: Exists</title>
      <link>https://community.qlik.com/t5/QlikView/Exists/m-p/340021#M125510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shouldn't be ... just double check that the field Holidays is loaded in the second QVW prior to this statement, and that all the field names are spelled exactly the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jul 2012 21:50:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exists/m-p/340021#M125510</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2012-07-08T21:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Exists</title>
      <link>https://community.qlik.com/t5/QlikView/Exists/m-p/340022#M125511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;/EM&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;/EM&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;/EM&gt;&lt;/P&gt;Thanks for your response, I have spent my whole day but could find any issue with the Spelling or loading but the if statement is not working. &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find the script i have used. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TempCalendar:&amp;nbsp; &lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;Date($(vDateMin) + RowNo() - 1) AS TempDate&amp;nbsp; &lt;/P&gt;&lt;P&gt;AUTOGENERATE 1&amp;nbsp; &lt;/P&gt;&lt;P&gt;WHILE $(vDateMin)+IterNo()-1&amp;lt;= $(vDateMax);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Holiday:&lt;BR /&gt;NoConcatenate&lt;BR /&gt;LOAD Date(DT) as Holidays, &lt;BR /&gt;FROM&lt;BR /&gt;[C;\SLS_CALN.xls]&lt;BR /&gt;(biff, embedded labels, table is [Sheet 1$]) Where FLG='Y';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calendar:&amp;nbsp; &lt;BR /&gt;LOAD &lt;BR /&gt;Date(TempDate) AS TempDate,&lt;BR /&gt;WeekDay(TempDate) AS DayName,&amp;nbsp; &lt;BR /&gt;If((WeekDay(TempDate)='Sat' or WeekDay(TempDate)='Sun'),1,If(Exists(Holidays,TempDate),2,3)) as Hday,&lt;BR /&gt;Day(TempDate) AS DayOfMonth,&amp;nbsp; &lt;BR /&gt;Month(TempDate) AS MonthName,&amp;nbsp; &lt;BR /&gt;'Q' &amp;amp; Ceil(Month(TempDate)/3) AS Quarter,&amp;nbsp; &lt;BR /&gt;Year(TempDate) AS Year,&amp;nbsp; &lt;BR /&gt;MonthName(TempDate) as MonthAndYear,&amp;nbsp; &lt;BR /&gt;MonthStart(TempDate) as MonthStart,&amp;nbsp; &lt;BR /&gt;MonthEnd(TempDate) as MonthEnd&amp;nbsp; &lt;BR /&gt;RESIDENT TempCalendar ; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if i miss something here.&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jul 2012 22:11:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exists/m-p/340022#M125511</guid>
      <dc:creator>brindlogcool</dc:creator>
      <dc:date>2012-07-08T22:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Exists</title>
      <link>https://community.qlik.com/t5/QlikView/Exists/m-p/340023#M125512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I loaded the following version of your script and it worked correctly without any error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;(Note: I added values for the variables vMinDate and vMaxDate and also used an Excel spreadsheet of my own in order to reload..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;The corrections I made include the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;- The pathname of the Excel sheet, (Use &lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;C:&lt;/STRONG&gt;&lt;/SPAN&gt; instead of &lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;C;&lt;/STRONG&gt;&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;- Use &lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG style="color: #ff0000;"&gt;Lookup&lt;/STRONG&gt;&lt;/SPAN&gt; function instead of &lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Exists&lt;/STRONG&gt;&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Let vDateMin = '07/01/2012';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Let vDateMax = '07/31/2012';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;TempCalendar: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Date('$(vDateMin)' + RowNo() - 1) AS TempDate &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;AUTOGENERATE 1 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;WHILE '$(vDateMin)'+IterNo()-1&amp;lt;= '$(vDateMax)';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Holiday:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;NoConcatenate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD Date(DT) as Holidays &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FROM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;[SLS_CALN.xlsx]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;(ooxml, embedded labels, table is Sheet1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Calendar:&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Date(TempDate) AS TempDate,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;WeekDay(TempDate) AS DayName,&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;//If((WeekDay(TempDate)='Sat' or WeekDay(TempDate)='Sun'),1,If(Exists(Holidays,TempDate),2,3)) as Hday,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;If((WeekDay(TempDate)='Sat' or WeekDay(TempDate)='Sun'),1,If(Lookup('Holidays','Holidays',TempDate,'Holiday')=TempDate,2,3)) as Hday,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Day(TempDate) AS DayOfMonth,&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Month(TempDate) AS MonthName,&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;'Q' &amp;amp; Ceil(Month(TempDate)/3) AS Quarter,&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Year(TempDate) AS Year,&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MonthName(TempDate) as MonthAndYear,&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MonthStart(TempDate) as MonthStart,&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MonthEnd(TempDate) as MonthEnd&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;RESIDENT TempCalendar ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this Helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jul 2012 23:00:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exists/m-p/340023#M125512</guid>
      <dc:creator>nagaiank</dc:creator>
      <dc:date>2012-07-08T23:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: Exists</title>
      <link>https://community.qlik.com/t5/QlikView/Exists/m-p/340024#M125513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wouldn't go as far as replacing exists() with a lookup(). The correction of the file path should help getting the load right. If you haven't been getting errors on this load, your Error Mode must be set to 0, which is very dangrous in the development phase - you can easily overlook problems like this one. I recommend setting Error Mode to 1, to get informed about any critical errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition, I'd recommend troubleshooting&amp;nbsp; your data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- create a list box with the field TempDate and examine the format and the contents of the field.&lt;/P&gt;&lt;P&gt;- do the same with the field Holidays - is it loaded from Excel as expected? What is the date format? Is it a Date field or perhaps a String or a Number?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 01:48:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exists/m-p/340024#M125513</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2012-07-09T01:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: Exists</title>
      <link>https://community.qlik.com/t5/QlikView/Exists/m-p/340025#M125514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your response.But it is not working.I think i need to check the date formats.I am completely lost bcs i am not getting nether error nor result.That to it is working in one qlikview file and not working in other qlikview file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 02:00:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exists/m-p/340025#M125514</guid>
      <dc:creator>brindlogcool</dc:creator>
      <dc:date>2012-07-09T02:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: Exists</title>
      <link>https://community.qlik.com/t5/QlikView/Exists/m-p/340026#M125515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have attached the qvw file and the Excel file of the working application. You may use it, if it helps you fix your date formats.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 02:41:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exists/m-p/340026#M125515</guid>
      <dc:creator>nagaiank</dc:creator>
      <dc:date>2012-07-09T02:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Exists</title>
      <link>https://community.qlik.com/t5/QlikView/Exists/m-p/340027#M125516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As suggested by Oleg, the application works with the Exists function also.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 02:58:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exists/m-p/340027#M125516</guid>
      <dc:creator>nagaiank</dc:creator>
      <dc:date>2012-07-09T02:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: Exists</title>
      <link>https://community.qlik.com/t5/QlikView/Exists/m-p/340028#M125517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Oleg and Krishnamoorthy for your response.There is some issue in passing the Dynamic Start and End Date for the calendar. I have checked your QVW file it is working fine with lookup and the Exists function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Oleg the error mode i have set to 1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 03:24:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exists/m-p/340028#M125517</guid>
      <dc:creator>brindlogcool</dc:creator>
      <dc:date>2012-07-09T03:24:58Z</dc:date>
    </item>
  </channel>
</rss>

