<?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: Count Days If Working Day in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1589351#M43201</link>
    <description>&lt;P&gt;Thanks for your answer Martinpohl!&lt;/P&gt;&lt;P&gt;NetWorkDays() is not working because i got workdays on weekends...&lt;/P&gt;&lt;P&gt;With your second option i got an invalid visualization.&lt;/P&gt;&lt;P&gt;Do you got another idea?&lt;/P&gt;&lt;P&gt;Thanks alot!&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
    <pubDate>Fri, 07 Jun 2019 06:51:10 GMT</pubDate>
    <dc:creator>rohi__</dc:creator>
    <dc:date>2019-06-07T06:51:10Z</dc:date>
    <item>
      <title>Count Days If Working Day</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1588880#M43154</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I couldn't find a solution for my problem so I created my own Question.&lt;/P&gt;&lt;P&gt;I'd like to get the amount of days which expired during the period "StartDate" to "EndDate" if it was a working day.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I got my Calendar with:&lt;/P&gt;&lt;P&gt;Date | Workday&lt;/P&gt;&lt;P&gt;1/1/2019 | 0&lt;/P&gt;&lt;P&gt;1/2/2019 | 0&lt;/P&gt;&lt;P&gt;1/3/2019 | 1&lt;/P&gt;&lt;P&gt;1/4/2019 | 1&lt;/P&gt;&lt;P&gt;1/5/2019 | 1&lt;/P&gt;&lt;P&gt;1/6/2019 | 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the Orders Table:&lt;/P&gt;&lt;P&gt;Order | StartDate | EndDate&lt;/P&gt;&lt;P&gt;A |&amp;nbsp;1/1/2019 |&amp;nbsp;1/6/2019&lt;/P&gt;&lt;P&gt;B |&amp;nbsp;1/3/2019 |&amp;nbsp;1/4/2019&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to create a measure or a column in the orders table.&lt;/P&gt;&lt;P&gt;Is there something like "CountDays(From = StartDate, To = EndDate, IF ( Workday = 1))"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance!&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;rohi__&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 20:43:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1588880#M43154</guid>
      <dc:creator>rohi__</dc:creator>
      <dc:date>2024-11-16T20:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: Count Days If Working Day</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1588883#M43155</link>
      <description>&lt;P&gt;Hi Rohi,&lt;/P&gt;&lt;P&gt;Qlik has a function for this called Networkday() see the &lt;A href="https://help.qlik.com/nl-NL/sense/February2019/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTimeFunctions/networkdays.htm" target="_self"&gt;help&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;You enter the start date and end date and it will calculate this for you.&lt;/P&gt;&lt;P&gt;Jordy&lt;/P&gt;&lt;P&gt;Climber&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 08:55:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1588883#M43155</guid>
      <dc:creator>JordyWegman</dc:creator>
      <dc:date>2019-06-06T08:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Count Days If Working Day</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1588884#M43156</link>
      <description>&lt;P&gt;Hi Climber,&lt;/P&gt;&lt;P&gt;thanks for your fast Reply!&lt;/P&gt;&lt;P&gt;I've tried it with the NetWorkDays() function, but the problem is that i've got specific workdays.&lt;/P&gt;&lt;P&gt;The function just removes the weekends in my understandings.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you got another idea?&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 08:58:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1588884#M43156</guid>
      <dc:creator>rohi__</dc:creator>
      <dc:date>2019-06-06T08:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: Count Days If Working Day</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1588890#M43157</link>
      <description>&lt;P&gt;Yes, but you can still use this.&lt;/P&gt;&lt;P&gt;Expand your calendar with a concat function and use this as the 'holiday' part. Here you exclude all the days you don't want to have (all the 0's).&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Data:
Load
	Concat(Date,',') as DateWorkday
Where Workday = 0
;
load* Inline [
Date , Workday
1/1/2019 , 0
1/2/2019 , 0
1/3/2019 , 1
1/4/2019 , 1
1/5/2019 , 1
1/6/2019 , 0
];&lt;/LI-CODE&gt;&lt;P&gt;Jordy&lt;/P&gt;&lt;P&gt;Climber&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 09:13:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1588890#M43157</guid>
      <dc:creator>JordyWegman</dc:creator>
      <dc:date>2019-06-06T09:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Count Days If Working Day</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1588895#M43158</link>
      <description>&lt;P&gt;Allright.&lt;/P&gt;&lt;P&gt;In the DateWorkday i have to include all days with "workday = 0"?&lt;/P&gt;&lt;P&gt;But the holiday expression is working with holidaystart, holidayend, right?&lt;/P&gt;&lt;P&gt;How do I know from when until when the holidays are when I only have a list with zeros?&lt;/P&gt;&lt;P&gt;I actually need the first and last zero before another one comes.&lt;/P&gt;&lt;P&gt;Do you got an Idea for this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm sorry for all the questions, I really appreciate it!&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;rohi__&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 09:25:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1588895#M43158</guid>
      <dc:creator>rohi__</dc:creator>
      <dc:date>2019-06-06T09:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: Count Days If Working Day</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1588897#M43159</link>
      <description>&lt;P&gt;Two options:&lt;/P&gt;&lt;P&gt;As mentioned before, networkdays(Start,End,List of holidays) is an option if you want to count only days from monday - friday because networkdays don't count saturdays and sundays in general.&lt;/P&gt;&lt;P&gt;With your datas you can use an expression like&lt;/P&gt;&lt;P&gt;sum(if(Date&amp;gt;=StartDate and Date &amp;lt;=EndDate and Workday=1,1,0))&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 09:29:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1588897#M43159</guid>
      <dc:creator>martinpohl</dc:creator>
      <dc:date>2019-06-06T09:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: Count Days If Working Day</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1588899#M43160</link>
      <description>&lt;P&gt;Nope, the holiday works with a concatenated string of dates. See the Qlik help for this.&lt;/P&gt;&lt;P&gt;What I do with the 0, is make a concatenated list of all your dates that you don't want to include. With this, we think the otherway around. See it as this, you have you start date and end date. But you have specific days that you want to count the 1's, but then also specific days you don't want, the 0's.&lt;/P&gt;&lt;P&gt;With the holiday function we can only exclude and not include. So instead of using the 1's we need to include we have to use the 0's for this to exclude.&lt;/P&gt;&lt;P&gt;Do you get this idea?&lt;/P&gt;&lt;P&gt;This is how the function will look (and the long sentence is DateWorkday) NetworkDay(StartDate, EndDate, AllTheExtraDaysYouWantToExclude).&lt;/P&gt;&lt;P&gt;Jordy&lt;BR /&gt;Climber&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 09:37:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1588899#M43160</guid>
      <dc:creator>JordyWegman</dc:creator>
      <dc:date>2019-06-06T09:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Count Days If Working Day</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1588906#M43162</link>
      <description>Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/75411"&gt;@rohi__&lt;/a&gt;&lt;BR /&gt;I solved exactly the same issue for &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/75348"&gt;@Den&lt;/a&gt; Tuesday. Maybe he/she have more input for you in this matter.&lt;BR /&gt;&lt;BR /&gt;My solution is found here:&lt;BR /&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Sense-App-Development/Calculated-column-count-days-between-two-dates-on-calendar-table/m-p/1588338/highlight/true#M43073" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Sense-App-Development/Calculated-column-count-days-between-two-dates-on-calendar-table/m-p/1588338/highlight/true#M43073&lt;/A&gt;</description>
      <pubDate>Thu, 06 Jun 2019 09:53:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1588906#M43162</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-06-06T09:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Count Days If Working Day</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1589350#M43200</link>
      <description>&lt;P&gt;Thanks for your answer Jordy!&lt;/P&gt;&lt;P&gt;got the idea but the problem is that i got workdays at Weekends aswell, and networkdays is exluding them anyhow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 06:49:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1589350#M43200</guid>
      <dc:creator>rohi__</dc:creator>
      <dc:date>2019-06-07T06:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: Count Days If Working Day</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1589351#M43201</link>
      <description>&lt;P&gt;Thanks for your answer Martinpohl!&lt;/P&gt;&lt;P&gt;NetWorkDays() is not working because i got workdays on weekends...&lt;/P&gt;&lt;P&gt;With your second option i got an invalid visualization.&lt;/P&gt;&lt;P&gt;Do you got another idea?&lt;/P&gt;&lt;P&gt;Thanks alot!&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 06:51:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1589351#M43201</guid>
      <dc:creator>rohi__</dc:creator>
      <dc:date>2019-06-07T06:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: Count Days If Working Day</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1589354#M43202</link>
      <description>&lt;P&gt;Thanks for your answer Vegar!&lt;/P&gt;&lt;P&gt;I tried the logic behind your Code, it's working. But the performance is really bad... The code ran the whole night..&lt;/P&gt;&lt;P&gt;Is there another way?&lt;/P&gt;&lt;P&gt;Thanks for your reply!&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 07:20:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1589354#M43202</guid>
      <dc:creator>rohi__</dc:creator>
      <dc:date>2019-06-07T07:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: Count Days If Working Day</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1589388#M43206</link>
      <description>&lt;P&gt;try to crete variable and pass working days into it&lt;/P&gt;&lt;P&gt;networkingdays(start,end,variable)&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 07:47:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1589388#M43206</guid>
      <dc:creator>Channa</dc:creator>
      <dc:date>2019-06-07T07:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: Count Days If Working Day</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1589396#M43207</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;This is your solution. You can use IntervalMatch for this. Try the following script:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[YourData]:
Load * Inline [
Date , Workday
1/1/2019 , 0
1/2/2019 , 0
1/3/2019 , 1
1/4/2019 , 1
1/5/2019 , 1
1/6/2019 , 0
];

[Data]:
Load * Inline [
Order , StartDate , EndDate
A , 1/1/2019 , 1/6/2019
B , 1/2/2019 , 1/4/2019 
];

Inner Join IntervalMatch (Date)
Load
StartDate,
EndDate
Resident Data;&lt;/LI-CODE&gt;&lt;P&gt;Then add the following formula:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Count({$&amp;lt; Workday = {1}&amp;gt;}Workday)&lt;/LI-CODE&gt;&lt;P&gt;Results in the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jordy&lt;/P&gt;&lt;P&gt;Climber&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 08:12:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1589396#M43207</guid>
      <dc:creator>JordyWegman</dc:creator>
      <dc:date>2019-06-07T08:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Count Days If Working Day</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1589400#M43208</link>
      <description>&lt;P&gt;Sure there is another way to solve this. Lets try using IntervalMatch().&amp;nbsp; See attached qvf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Script using intervalMatch" style="width: 921px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/13372i4909019A56B9F7E4/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="Script using intervalMatch" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Script using intervalMatch&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Result in table using different total methods" style="width: 991px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/13373iF7673389A1266920/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="Result in table using different total methods" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Result in table using different total methods&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&amp;nbsp;Ping:&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/75348"&gt;@Den&lt;/a&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 08:19:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1589400#M43208</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-06-07T08:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Count Days If Working Day</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1589412#M43210</link>
      <description>It looks like me and &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/4683"&gt;@JordyWegman&lt;/a&gt; thought of a similar approach. The main difference between our two solutions is how many days that should be included in the interval. In Jordy's all days including start and end date are included, in my the first day is excluded (requirement in the similar post by @ Den. )</description>
      <pubDate>Fri, 07 Jun 2019 08:45:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1589412#M43210</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-06-07T08:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: Count Days If Working Day</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1589420#M43211</link>
      <description>&lt;P&gt;Yes, good solution&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/25001"&gt;@Vegar&lt;/a&gt;,&amp;nbsp;that depends on the whishes of the rohi.&lt;/P&gt;&lt;P&gt;Jordy&lt;/P&gt;&lt;P&gt;Climber&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 09:05:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1589420#M43211</guid>
      <dc:creator>JordyWegman</dc:creator>
      <dc:date>2019-06-07T09:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: Count Days If Working Day</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1589488#M43213</link>
      <description>&lt;P&gt;Thank you guys&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/4683"&gt;@JordyWegman&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/25001"&gt;@Vegar&lt;/a&gt;&amp;nbsp; for your help!&lt;/P&gt;&lt;P&gt;I will implement the codes soon and will mark your answers as solution!&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 11:04:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Days-If-Working-Day/m-p/1589488#M43213</guid>
      <dc:creator>rohi__</dc:creator>
      <dc:date>2019-06-07T11:04:05Z</dc:date>
    </item>
  </channel>
</rss>

