<?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 Employees entry where date does not exist(except weekends) in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Count-Employees-entry-where-date-does-not-exist-except-weekends/m-p/1683088#M52007</link>
    <description>&lt;P&gt;Thanks for your reply i tried with my current Master Calender i dont think it makes generations:&lt;/P&gt;&lt;P&gt;Iam already using for other tables:&lt;/P&gt;&lt;P&gt;is there a way to modify current master calendar or is there a way to do it without master calendar using another way?&lt;/P&gt;&lt;P&gt;QuartersMap:&lt;BR /&gt;MAPPING LOAD&lt;BR /&gt;rowno() as Month,&lt;BR /&gt;'Q' &amp;amp; Ceil (rowno()/3) as Quarter&lt;BR /&gt;AUTOGENERATE (12);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Let varMinDate = num(MakeDate(2014,01,01));&lt;BR /&gt;Let varMaxDate = num(Today());&lt;/P&gt;&lt;P&gt;TempCalendar:&lt;BR /&gt;LOAD&lt;BR /&gt;$(varMinDate) + Iterno()-1 As Num,&lt;BR /&gt;Date($(varMinDate) + IterNo() - 1) as TempDate&lt;BR /&gt;AutoGenerate 1 While $(varMinDate) + IterNo() -1 &amp;lt;= $(varMaxDate);&lt;BR /&gt;&lt;BR /&gt;MasterCalendar:&lt;BR /&gt;Load&lt;BR /&gt;num(TempDate) AS %Date,&lt;BR /&gt;Date(TempDate) as Date ,&lt;BR /&gt;Year(TempDate) As Year,&lt;BR /&gt;Year(TempDate) As سنة,&lt;BR /&gt;Month(TempDate) As Month,&lt;BR /&gt;Month(TempDate) As شهر,&lt;BR /&gt;&lt;BR /&gt;date(monthstart(TempDate), 'MMM-YYYY') as MonthYear,&lt;BR /&gt;ApplyMap('QuartersMap', month(TempDate), Null()) as Quarter,&lt;BR /&gt;&lt;BR /&gt;WeekDay(TempDate) as WeekDay&lt;BR /&gt;Resident TempCalendar&lt;BR /&gt;Order By TempDate ASC;&lt;BR /&gt;Drop Table TempCalendar;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Load * Inline [&lt;BR /&gt;Quarter, "ربع سنوي"&lt;BR /&gt;Q1, "الربع الأول "&lt;BR /&gt;Q2, "الربع الثاني "&lt;BR /&gt;Q3, "الربع الثالث "&lt;BR /&gt;Q4, "الربع الرابع "&lt;BR /&gt;];&lt;/P&gt;</description>
    <pubDate>Tue, 10 Mar 2020 04:42:38 GMT</pubDate>
    <dc:creator>Alarkis</dc:creator>
    <dc:date>2020-03-10T04:42:38Z</dc:date>
    <item>
      <title>Count Employees entry where date does not exist(except weekends)</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Employees-entry-where-date-does-not-exist-except-weekends/m-p/1683054#M52004</link>
      <description>&lt;P&gt;Hey all,&lt;/P&gt;&lt;P&gt;I need to know the&amp;nbsp; absences of employees from the this table&lt;/P&gt;&lt;P&gt;I want to know the missed days of employee where a date is missing&amp;nbsp;&lt;/P&gt;&lt;P&gt;Except for weekends..&lt;/P&gt;&lt;P&gt;thanks..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data similar to this:&lt;/P&gt;&lt;TABLE width="209"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="67"&gt;EMPNO&lt;/TD&gt;&lt;TD width="75"&gt;Date&lt;/TD&gt;&lt;TD width="67"&gt;Status&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;810&lt;/TD&gt;&lt;TD&gt;3/3/2020&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;805&lt;/TD&gt;&lt;TD&gt;4/3/2020&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;97&lt;/TD&gt;&lt;TD&gt;5/3/2020&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;810&lt;/TD&gt;&lt;TD&gt;8/3/2020&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;356&lt;/TD&gt;&lt;TD&gt;9/3/2020&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;810&lt;/TD&gt;&lt;TD&gt;10/3/2020&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;190&lt;/TD&gt;&lt;TD&gt;11/2/2020&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;849&lt;/TD&gt;&lt;TD&gt;12/2/2020&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 18:58:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Employees-entry-where-date-does-not-exist-except-weekends/m-p/1683054#M52004</guid>
      <dc:creator>Alarkis</dc:creator>
      <dc:date>2024-11-16T18:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: Count Employees entry where date does not exist(except weekends)</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Employees-entry-where-date-does-not-exist-except-weekends/m-p/1683060#M52005</link>
      <description>&lt;P&gt;This will not work if the dates don't exist. You can create an additional table with the list of all dates between the min and max as per a master calendar, also generate the Weekday function to ignore Saturday and Sunday.&lt;/P&gt;&lt;P&gt;eg&amp;nbsp;&lt;/P&gt;&lt;P&gt;MasterCalendar:&lt;BR /&gt;LOAD&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; Date(Date) AS Date,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; Year(Date) AS Year,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 'Q' &amp;amp; Ceil(Month(InvoiceDate) / 3) AS Quarter,&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; Month(InvoiceDate) As Month,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; Day(InvoiceDate) As Day,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; Week(InvoiceDate) As Week,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Weekday(Date) as WeekDay;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Load Date(MinDate + IterNo() -1 ) AS Date While (MinDate + IterNo() - 1) &amp;lt;= Num(MaxDate);&lt;/P&gt;&lt;P&gt;Load&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; Min(Date) AS MinDate,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; Max(Date) AS MaxDate&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;RESIDENT Employees;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This script works bottum up to create first Min and Max Dates, then a list of dates with no gaps, then creates date dimensions including Weekday.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Create a table with EmpNo as dimension and the expression on the front end would then be:&lt;BR /&gt;Count({&amp;lt;Status=-{1}, Weekday=-{'Sat.', 'Sun.'}&amp;gt;}Status)// Count all dates where Status not equal to 1, not on Saturday or Sunday&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 22:18:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Employees-entry-where-date-does-not-exist-except-weekends/m-p/1683060#M52005</guid>
      <dc:creator>Lisa_P</dc:creator>
      <dc:date>2020-03-09T22:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: Count Employees entry where date does not exist(except weekends)</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Employees-entry-where-date-does-not-exist-except-weekends/m-p/1683088#M52007</link>
      <description>&lt;P&gt;Thanks for your reply i tried with my current Master Calender i dont think it makes generations:&lt;/P&gt;&lt;P&gt;Iam already using for other tables:&lt;/P&gt;&lt;P&gt;is there a way to modify current master calendar or is there a way to do it without master calendar using another way?&lt;/P&gt;&lt;P&gt;QuartersMap:&lt;BR /&gt;MAPPING LOAD&lt;BR /&gt;rowno() as Month,&lt;BR /&gt;'Q' &amp;amp; Ceil (rowno()/3) as Quarter&lt;BR /&gt;AUTOGENERATE (12);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Let varMinDate = num(MakeDate(2014,01,01));&lt;BR /&gt;Let varMaxDate = num(Today());&lt;/P&gt;&lt;P&gt;TempCalendar:&lt;BR /&gt;LOAD&lt;BR /&gt;$(varMinDate) + Iterno()-1 As Num,&lt;BR /&gt;Date($(varMinDate) + IterNo() - 1) as TempDate&lt;BR /&gt;AutoGenerate 1 While $(varMinDate) + IterNo() -1 &amp;lt;= $(varMaxDate);&lt;BR /&gt;&lt;BR /&gt;MasterCalendar:&lt;BR /&gt;Load&lt;BR /&gt;num(TempDate) AS %Date,&lt;BR /&gt;Date(TempDate) as Date ,&lt;BR /&gt;Year(TempDate) As Year,&lt;BR /&gt;Year(TempDate) As سنة,&lt;BR /&gt;Month(TempDate) As Month,&lt;BR /&gt;Month(TempDate) As شهر,&lt;BR /&gt;&lt;BR /&gt;date(monthstart(TempDate), 'MMM-YYYY') as MonthYear,&lt;BR /&gt;ApplyMap('QuartersMap', month(TempDate), Null()) as Quarter,&lt;BR /&gt;&lt;BR /&gt;WeekDay(TempDate) as WeekDay&lt;BR /&gt;Resident TempCalendar&lt;BR /&gt;Order By TempDate ASC;&lt;BR /&gt;Drop Table TempCalendar;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Load * Inline [&lt;BR /&gt;Quarter, "ربع سنوي"&lt;BR /&gt;Q1, "الربع الأول "&lt;BR /&gt;Q2, "الربع الثاني "&lt;BR /&gt;Q3, "الربع الثالث "&lt;BR /&gt;Q4, "الربع الرابع "&lt;BR /&gt;];&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 04:42:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Employees-entry-where-date-does-not-exist-except-weekends/m-p/1683088#M52007</guid>
      <dc:creator>Alarkis</dc:creator>
      <dc:date>2020-03-10T04:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Count Employees entry where date does not exist(except weekends)</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Employees-entry-where-date-does-not-exist-except-weekends/m-p/1683089#M52008</link>
      <description>&lt;P&gt;Do you have multiple dates in your data ?&lt;/P&gt;&lt;P&gt;Maybe this date is not the date your calendar is based on.&lt;/P&gt;&lt;P&gt;If this is the only thing you need this date for then you can keep a separate calendar for this and only deriving the weekday and giving it a different name.&lt;/P&gt;&lt;P&gt;EmpCalendar:&lt;BR /&gt;LOAD&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; Date(EmpDate) AS EmpDate,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Weekday(EmpDate) as EmpWeekDay;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Load Date(MinEmpDate + IterNo() -1 ) AS Date While (MinEmpDate + IterNo() - 1) &amp;lt;= Num(MaxEmpDate);&lt;/P&gt;&lt;P&gt;Load&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; Min(EmpDate) AS MinEmpDate,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; Max(EmpDate) AS MaxEmpDate&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;RESIDENT Employees;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Count({&amp;lt;Status=-{1}, EmpWeekDay=-{'Sat.', 'Sun.'}&amp;gt;}Status)// Count all dates where Status not equal to 1, not on Saturday or Sunday&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 05:00:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Employees-entry-where-date-does-not-exist-except-weekends/m-p/1683089#M52008</guid>
      <dc:creator>Lisa_P</dc:creator>
      <dc:date>2020-03-10T05:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Count Employees entry where date does not exist(except weekends)</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Employees-entry-where-date-does-not-exist-except-weekends/m-p/1683095#M52010</link>
      <description>&lt;DIV class="headline edc_error"&gt;Hey,&lt;/DIV&gt;&lt;DIV class="headline edc_error"&gt;I am receiving this Error:&lt;/DIV&gt;&lt;DIV class="headline edc_error"&gt;Script:&lt;/DIV&gt;&lt;DIV class="headline edc_error"&gt;-------------&lt;/DIV&gt;&lt;DIV class="headline edc_error"&gt;&lt;P&gt;[EVENTS]:&lt;BR /&gt;LOAD NO,&lt;BR /&gt;USERNO,&lt;BR /&gt;DT,&lt;BR /&gt;CODE,&lt;BR /&gt;TYPE,&lt;BR /&gt;EVENTID&lt;BR /&gt;Where EVENTID = '66';&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;SELECT "NO",&lt;BR /&gt;"USERNO",&lt;BR /&gt;"DT",&lt;BR /&gt;"CODE",&lt;BR /&gt;"TYPE",&lt;BR /&gt;"EVENTID"&lt;BR /&gt;FROM "TSSPICA"."EVENTS";&lt;/P&gt;&lt;P&gt;-----------------------------------------&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class="headline edc_error"&gt;&lt;P&gt;EmpCalendar:&lt;BR /&gt;LOAD&lt;BR /&gt;Date(DT) AS EmpDate,&lt;BR /&gt;Weekday(DT) as EmpWeekDay;&lt;/P&gt;&lt;P&gt;Load Date(MinEmpDate + IterNo() -1 ) AS Date While (MinEmpDate + IterNo() - 1) &amp;lt;= Num(MaxEmpDate);&lt;/P&gt;&lt;P&gt;Load&lt;BR /&gt;Min(DT) AS MinEmpDate,&lt;BR /&gt;Max(DT) AS MaxEmpDate&lt;BR /&gt;RESIDENT [EVENTS];&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class="headline edc_error"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="headline edc_error"&gt;The following error occurred:&lt;/DIV&gt;&lt;DIV class="edc_error"&gt;Field 'DT' not found&lt;/DIV&gt;&lt;DIV class="empty undefined"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="headline edc_error"&gt;The error occurred here:&lt;/DIV&gt;&lt;DIV class="edc_error"&gt;?&lt;/DIV&gt;</description>
      <pubDate>Tue, 10 Mar 2020 05:52:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Employees-entry-where-date-does-not-exist-except-weekends/m-p/1683095#M52010</guid>
      <dc:creator>Alarkis</dc:creator>
      <dc:date>2020-03-10T05:52:56Z</dc:date>
    </item>
  </channel>
</rss>

