<?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 Count Public Holiday Dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284922#M461775</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good day.&lt;/P&gt;&lt;P&gt;i am hoping that somebody could assist me.&lt;/P&gt;&lt;P&gt;i have a table with all public holiday dates for each year. i am needing to count how many dates there are in the selected year and month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason for this is to be able to calculate how many trading days we have in a selected year or month by calculating the Networking and subtracting any public holidays.&lt;/P&gt;&lt;P&gt;i have tried the following expression which is giving me a problem.&lt;/P&gt;&lt;P&gt;the table contains only a list of dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Count({&amp;lt;year(Date(Max(PublicHoliday))) = {'=$(FinYear)'}&amp;gt;} [PublicHoliday])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Dec 2016 07:17:38 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-12-06T07:17:38Z</dc:date>
    <item>
      <title>Count Public Holiday Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284922#M461775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good day.&lt;/P&gt;&lt;P&gt;i am hoping that somebody could assist me.&lt;/P&gt;&lt;P&gt;i have a table with all public holiday dates for each year. i am needing to count how many dates there are in the selected year and month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason for this is to be able to calculate how many trading days we have in a selected year or month by calculating the Networking and subtracting any public holidays.&lt;/P&gt;&lt;P&gt;i have tried the following expression which is giving me a problem.&lt;/P&gt;&lt;P&gt;the table contains only a list of dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Count({&amp;lt;year(Date(Max(PublicHoliday))) = {'=$(FinYear)'}&amp;gt;} [PublicHoliday])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 07:17:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284922#M461775</guid>
      <dc:creator />
      <dc:date>2016-12-06T07:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: Count Public Holiday Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284923#M461776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would use a different way by flagging the working days within the master-calendar with 1 - excluding Sa. and Su. per weekday() and further excluding holidays per applymap() - and then using something like: sum(WorkingDaysFlag) within your objects. An example how it could be done could you find here: &lt;A href="https://community.qlik.com/docs/DOC-14220"&gt;Master Calendar with movable holidays&lt;/A&gt;.&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, 06 Dec 2016 07:52:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284923#M461776</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-12-06T07:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: Count Public Holiday Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284924#M461777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;year(Date(Max(PublicHoliday))) = {'=$(FinYear)'&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Is FinYear a variable or a field? If it's a field then you've got things the wrong way around:&lt;/P&gt;&lt;P&gt;FinYear={"$(=Year(Max(PublicHoliday)))"}.&lt;/P&gt;&lt;P&gt;If FinYear is a variable then you need something like: PublicHoliday={"=Year(PublicHoliday)=$(FinYear)"}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 07:54:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284924#M461777</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-12-06T07:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: Count Public Holiday Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284925#M461778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is your public holidays field in the same table as your calendar or your fact table or is it a stand alone table with just public holidays? how is it linked to the rest of the model?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 07:58:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284925#M461778</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-06T07:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Count Public Holiday Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284926#M461779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good day Marcus.&lt;/P&gt;&lt;P&gt;thank you for your response.&lt;/P&gt;&lt;P&gt;i will look into this, i am still very new to Qlikview so still learning best practices &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 08:02:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284926#M461779</guid>
      <dc:creator />
      <dc:date>2016-12-06T08:02:01Z</dc:date>
    </item>
    <item>
      <title>Re: Count Public Holiday Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284927#M461780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good day gysbert.&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;FinYear is a vairable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 08:02:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284927#M461780</guid>
      <dc:creator />
      <dc:date>2016-12-06T08:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: Count Public Holiday Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284928#M461781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good day qlikdeez.&lt;/P&gt;&lt;P&gt;Thank you for your reponse.&lt;/P&gt;&lt;P&gt;Currently my public holidays are in a stand alone table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 08:03:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284928#M461781</guid>
      <dc:creator />
      <dc:date>2016-12-06T08:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: Count Public Holiday Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284929#M461782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would say, left join it to the date field you want to calculate against if you dont have a calendar that is linked to the rest of the model. Make sure the date formats are the same for the joins&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count({&amp;lt;year(Date(Max(PublicHoliday))) = {'=$(FinYear)'}&amp;gt;} [PublicHoliday])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;count({&amp;lt;YourYearField = {'$(FinYear)'}, YourMonthField = {'$(vMonthVariable)'}&amp;gt;} Distinct [PublicHoliday])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;gt; to get the number of public holidays within the year month selections.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({&amp;lt;YourYearField = {'$(FinYear)'}, YourMonthField = {'$(vMonthVariable)'}&amp;gt;} Distinct [ActualDaysInMonthField])&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;count({&amp;lt;YourYearField = {'$(FinYear)'}, YourMonthField = {'$(vMonthVariable)'}&amp;gt;} Distinct [PublicHoliday])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to get the Tradingdays&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 08:17:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284929#M461782</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-06T08:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: Count Public Holiday Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284930#M461783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good day qlikdeez.&lt;/P&gt;&lt;P&gt;Thank you for your reply. apologies for the late reply, i had to leave the office.&lt;/P&gt;&lt;P&gt;my FinYear variable is a variable that sets the latest Financial Year on Load, i do not have any variables for months, how do i count public holidays in the selected month and not from a variable?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 15:48:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284930#M461783</guid>
      <dc:creator />
      <dc:date>2016-12-06T15:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: Count Public Holiday Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284931#M461784</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;leave out this part of the expression "&lt;STRONG&gt;,YourMonthField = {'$(vMonthVariable)'}&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;If your month is selected then Set analysis will allow the expression to consider your selection on Month and Other fields when calculating except for the year which you are setting to FinYear&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 06:18:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284931#M461784</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-07T06:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: Count Public Holiday Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284932#M461785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good day qlikdeez.&lt;/P&gt;&lt;P&gt;Thank your for your reply.&lt;/P&gt;&lt;P&gt;i did try that yesterday by leaving out the month, the expression was ok but the count remained 0.&lt;/P&gt;&lt;P&gt;mt variable finYear is just the year not a date, while the public holiday is a date field should that still work?&lt;/P&gt;&lt;P&gt;another thing our Financial years are setup one year ahead (eg. in 2016 our FinYear is 2017) i also tried to deduct 1 when trying to do the analysis but the count still remained 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what am i doing wrong here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 06:31:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284932#M461785</guid>
      <dc:creator />
      <dc:date>2016-12-07T06:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: Count Public Holiday Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284933#M461786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;If you have correctly left joined the PublicHoliday field to the table that contains the Year you want to work with..&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;count({&amp;lt;YourYearField = {'$(FinYear)'&amp;gt;} Distinct [PublicHoliday])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;in the above YourYearField should be in the same format of FinYear variable i.e YYYY&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;on the front end drop an inputbox to see if FinYear is populated&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Also check YourYearField to see if the format matches FinYear&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if not convert it i.e year(YourYearField)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PublicHoliday can be in a different format i.e DD/MM/YYYY but the count should work&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 08:28:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284933#M461786</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-07T08:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: Count Public Holiday Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284934#M461787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will give you an idea how to get it done...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 09:34:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284934#M461787</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-07T09:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: Count Public Holiday Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284935#M461788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good day Deran.&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;i have changed my public holiday table structure to include the year for each public holiday date.&lt;/P&gt;&lt;P&gt;when i try and use your above example i get error "Error in set modifier ad hoc element list: ',' or ')' expected'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is what i am using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=count({&amp;lt;PublicHolidayFinYear = {'$(FinYear)'&amp;gt;} Distinct [PublicHoliday])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;i have brought 'PublicHolidayFinYear' field to match my FinYear variable.&lt;/P&gt;&lt;P&gt;what am i doing anything wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 14:38:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284935#M461788</guid>
      <dc:creator />
      <dc:date>2016-12-07T14:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: Count Public Holiday Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284936#M461789</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;Check the attachement posted previously to get an idea of how to link up and flag the public holidays.&lt;/P&gt;&lt;P&gt;Also check the expression setup.&lt;/P&gt;&lt;P&gt;In the example, I just used random dates to flag as public holiday.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Dec 2016 06:40:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284936#M461789</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-08T06:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: Count Public Holiday Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284937#M461790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good day.&lt;/P&gt;&lt;P&gt;Thank you to all who have helped me with this, i have managed to get the correct counts with a mixture of all suggestions. qlikdeez, thank you so much for your example app, it has really helped me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you guys are awesome&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Dec 2016 14:09:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Public-Holiday-Dates/m-p/1284937#M461790</guid>
      <dc:creator />
      <dc:date>2016-12-08T14:09:24Z</dc:date>
    </item>
  </channel>
</rss>

