<?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: Weekend counts in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728487#M723505</link>
    <description>&lt;P&gt;try below. Column(1) means your first expression. You can change it accordingly&lt;/P&gt;&lt;P&gt;=sum(aggr(if(count({&amp;lt;Weekend&amp;gt;}ID)=0, above(total &lt;STRONG&gt;column(1)&lt;/STRONG&gt;),count({&amp;lt;Weekend&amp;gt;}ID)),Weekend))*avg(1)&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jul 2020 13:59:04 GMT</pubDate>
    <dc:creator>Kushal_Chawda</dc:creator>
    <dc:date>2020-07-16T13:59:04Z</dc:date>
    <item>
      <title>Weekend counts</title>
      <link>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728258#M723502</link>
      <description>&lt;P&gt;HI All ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have to show the total counts by Weekend till today even if there is no date for that .&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I mean is I have a field call "&lt;STRONG&gt;Date&lt;/STRONG&gt;" from which I am getting&amp;nbsp; Weekend and also using the master calneder to generate the missing dates . But i am not able to generate it till today .&amp;nbsp;&lt;/P&gt;&lt;P&gt;Say for example i have&amp;nbsp; &lt;STRONG&gt;2&lt;/STRONG&gt; counts on weekend 12-October 2019 and the next count is &lt;STRONG&gt;5&amp;nbsp;&lt;/STRONG&gt; on&amp;nbsp; 30-Nov-2019 then my Count should&amp;nbsp; show as &lt;STRONG&gt;2&lt;/STRONG&gt; from 12-Oct-2019 till&amp;nbsp; 23-Nov-2019.&amp;nbsp; Which I am not able to get this .&amp;nbsp; Can please someone help me on this ?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am attaching my QVW file for refrence .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="smilingjohn_0-1594880930083.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/37497i8A7B8ADD4EB315B2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="smilingjohn_0-1594880930083.png" alt="smilingjohn_0-1594880930083.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728258#M723502</guid>
      <dc:creator>smilingjohn</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Weekend counts</title>
      <link>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728368#M723503</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;Any help please&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 10:32:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728368#M723503</guid>
      <dc:creator>smilingjohn</dc:creator>
      <dc:date>2020-07-16T10:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: Weekend counts</title>
      <link>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728478#M723504</link>
      <description>&lt;P&gt;Hi Community&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 13:42:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728478#M723504</guid>
      <dc:creator>smilingjohn</dc:creator>
      <dc:date>2020-07-16T13:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: Weekend counts</title>
      <link>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728487#M723505</link>
      <description>&lt;P&gt;try below. Column(1) means your first expression. You can change it accordingly&lt;/P&gt;&lt;P&gt;=sum(aggr(if(count({&amp;lt;Weekend&amp;gt;}ID)=0, above(total &lt;STRONG&gt;column(1)&lt;/STRONG&gt;),count({&amp;lt;Weekend&amp;gt;}ID)),Weekend))*avg(1)&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 13:59:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728487#M723505</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-07-16T13:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: Weekend counts</title>
      <link>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728495#M723506</link>
      <description>&lt;P&gt;Thanks for the reply Khush,&lt;/P&gt;&lt;P&gt;Now i see it giving the desired output , What do u mean by&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;above(total&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;column(1)&lt;/STRONG&gt;&lt;SPAN&gt;), ?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;As i copied your expression and pasted in mine and it worked .&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But it is not showing the weekend date till today . The last daet is till&amp;nbsp; March-7-2020 but i need to show it till Tdays date .How can I achieve this ?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 14:23:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728495#M723506</guid>
      <dc:creator>smilingjohn</dc:creator>
      <dc:date>2020-07-16T14:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: Weekend counts</title>
      <link>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728528#M723507</link>
      <description>&lt;P&gt;Column(1) refers to the expression number of your chart. Let's say you have straight table and have two expressions. Then column(1) refers to first expression and column(2) refers to second expression.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to create Dates till today, Can't you create it using master calendar?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 16:07:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728528#M723507</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-07-16T16:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Weekend counts</title>
      <link>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728535#M723508</link>
      <description>&lt;P&gt;Thanks Khush&lt;/P&gt;&lt;P&gt;I have the master calendar created from date field .&lt;/P&gt;&lt;P&gt;But it is not giving me the data till date . How can I handle this .&lt;/P&gt;&lt;P&gt;The actual date in the data is till 7-march-2020&lt;/P&gt;&lt;P&gt;And I see the master calendar generating all the missing dates till 7march .&lt;/P&gt;&lt;P&gt;But I want it till today .how do I achieve this .&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 16:22:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728535#M723508</guid>
      <dc:creator>smilingjohn</dc:creator>
      <dc:date>2020-07-16T16:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: Weekend counts</title>
      <link>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728541#M723509</link>
      <description>&lt;P&gt;can you share calendar script?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 16:36:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728541#M723509</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-07-16T16:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Weekend counts</title>
      <link>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728542#M723510</link>
      <description>&lt;P&gt;Hi Khush,&lt;/P&gt;&lt;P&gt;Below is the script&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Trend:&lt;BR /&gt;LOAD ID,&lt;BR /&gt;Status,&lt;BR /&gt;Date&lt;BR /&gt;&lt;BR /&gt;FROM&lt;BR /&gt;[C:\trend.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Calendar:&lt;BR /&gt;LOAD&lt;/P&gt;&lt;P&gt;Date(MinDate + IterNo() -1,'DD/MM/YYYY') as Date,&lt;BR /&gt;WeekEnd(date(MinDate + IterNo() -1,'DD/MM/YYYY')) as Weekend,&lt;BR /&gt;Date(MinDate + IterNo() -1,'YYYY') as Year,&lt;BR /&gt;Date(MinDate + IterNo() -1,'MM/YY') as Month,&lt;BR /&gt;Date(MinDate + IterNo() -1,'YY') &amp;amp; '_' &amp;amp; Num(Week(MinDate + IterNo() -1),'00') as Week&lt;/P&gt;&lt;P&gt;While&lt;BR /&gt;MinDate + IterNo() -1 &amp;lt;=MaxDate;&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt;min(Date) as MinDate,&lt;BR /&gt;max(Date) as MaxDate&lt;/P&gt;&lt;P&gt;Resident Trend;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 16:53:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728542#M723510</guid>
      <dc:creator>smilingjohn</dc:creator>
      <dc:date>2020-07-16T16:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: Weekend counts</title>
      <link>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728552#M723511</link>
      <description>&lt;P&gt;Hi Khush,&lt;/P&gt;&lt;P&gt;This is the date i have&amp;nbsp; Min date is 12-Oct-2019 and Max date is&amp;nbsp; 4-Mar-2020 .The caledar is generating the dates from 12-Oct-2019 till 4-Mar-2020 but i want the dates to be till today. Thanks&lt;/P&gt;&lt;TABLE width="140"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="140"&gt;Date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12-Oct-19&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12-Oct-19&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;24-Nov-19&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2-Dec-19&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2-Dec-19&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2-Dec-19&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12-Jan-20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12-Jan-20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4-Mar-20&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 16 Jul 2020 17:13:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728552#M723511</guid>
      <dc:creator>smilingjohn</dc:creator>
      <dc:date>2020-07-16T17:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Weekend counts</title>
      <link>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728555#M723512</link>
      <description>&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;Trend:&lt;BR /&gt;LOAD ID,&lt;BR /&gt;Status,&lt;BR /&gt;Date&lt;BR /&gt;&lt;BR /&gt;FROM&lt;BR /&gt;[C:\trend.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Calendar:&lt;BR /&gt;LOAD&lt;/P&gt;&lt;P&gt;Date(MinDate + IterNo() -1,'DD/MM/YYYY') as Date,&lt;BR /&gt;WeekEnd(date(MinDate + IterNo() -1,'DD/MM/YYYY')) as Weekend,&lt;BR /&gt;Date(MinDate + IterNo() -1,'YYYY') as Year,&lt;BR /&gt;Date(MinDate + IterNo() -1,'MM/YY') as Month,&lt;BR /&gt;Date(MinDate + IterNo() -1,'YY') &amp;amp; '_' &amp;amp; Num(Week(MinDate + IterNo() -1),'00') as Week&lt;/P&gt;&lt;P&gt;While&lt;BR /&gt;MinDate + IterNo() -1 &amp;lt;=MaxDate;&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt;min(Date) as MinDate,&lt;BR /&gt;&lt;STRONG&gt;floor(today())&lt;/STRONG&gt; as MaxDate&lt;/P&gt;&lt;P&gt;Resident Trend;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 17:33:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728555#M723512</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-07-16T17:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: Weekend counts</title>
      <link>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728564#M723513</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336"&gt;@Kushal_Chawda&lt;/a&gt;&amp;nbsp; you are just awesome sir,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now this is generating the the dates till today .&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried with my actaul forlmula as shown belwo which is not giving me correct result when i add status ? Can you please correct this ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sum(aggr(if(count({&amp;lt;Status={'Open'},Weekend&amp;gt;}ID)=0, above(total column(1)),count({&amp;lt;Status={'Open'},Weekend&amp;gt;}ID)),Weekend))*avg(1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 17:49:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728564#M723513</guid>
      <dc:creator>smilingjohn</dc:creator>
      <dc:date>2020-07-16T17:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: Weekend counts</title>
      <link>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728591#M723514</link>
      <description>&lt;P&gt;Hi Kush,&lt;/P&gt;&lt;P&gt;The result works perfectly with your suggested expression which is this&amp;nbsp;&lt;/P&gt;&lt;P&gt;sum(aggr(if(count({&amp;lt;Weekend&amp;gt;}ID)=0,above(total column(1)),count({&amp;lt;Weekend&amp;gt;}ID)),Weekend))*avg(1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I ad my filter condition within the expression it dont work properly . Can u please correct me&amp;nbsp; the below expression .&lt;/P&gt;&lt;P&gt;sum(aggr(if(count({&amp;lt;Status={'Open'},Weekend&amp;gt;}ID)=0, above(total column(1)),count({&amp;lt;Status={'Open'},Weekend&amp;gt;}ID)),Weekend))*avg(1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And also when i make some list box selection the result dont act accoding to selections .&amp;nbsp;&lt;/P&gt;&lt;P&gt;Without making any selection it displays proper result as hown in the below screenshot&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="smilingjohn_0-1594926299672.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/37565iB33179915BBC9465/image-size/medium?v=v2&amp;amp;px=400" role="button" title="smilingjohn_0-1594926299672.png" alt="smilingjohn_0-1594926299672.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And when i seelct 'aa' from the Dept list box it displays the count only to that perticular dates , rather it should behave like above .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="smilingjohn_1-1594926401047.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/37566i68DA5B8F91BAA2CD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="smilingjohn_1-1594926401047.png" alt="smilingjohn_1-1594926401047.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 19:06:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728591#M723514</guid>
      <dc:creator>smilingjohn</dc:creator>
      <dc:date>2020-07-16T19:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: Weekend counts</title>
      <link>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728647#M723515</link>
      <description>&lt;P&gt;try below expression. If does not work then share your sample app&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;=sum(aggr(sum({&amp;lt;Date&amp;gt;}aggr({&amp;lt;Date&amp;gt;} if(count({&amp;lt;Date&amp;gt;}ID)&amp;gt;0,count({&amp;lt;Status={'Open'},Date&amp;gt;}ID),
above(total column(1))),(Date, (NUMERIC, ASCENDING)))),Date))* avg(1)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 16 Jul 2020 22:46:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728647#M723515</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-07-16T22:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: Weekend counts</title>
      <link>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728683#M723516</link>
      <description>&lt;P&gt;HI Kush,&lt;/P&gt;&lt;P&gt;The last expression you suggested is not working , Please find the attachment of the application.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2020 04:15:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728683#M723516</guid>
      <dc:creator>smilingjohn</dc:creator>
      <dc:date>2020-07-17T04:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Weekend counts</title>
      <link>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728749#M723517</link>
      <description>&lt;P&gt;Without selection of Dept expression works fine, but if you also want to work that for other dimensions then you need to fill the Dates in your Date for each dimension&lt;/P&gt;&lt;P&gt;You may need to update the highlighted code if you want to add more dimensions other than &lt;STRONG&gt;Dept&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;BR /&gt;LOAD&lt;BR /&gt;ID,&lt;BR /&gt;Status,&lt;BR /&gt;"Date",&lt;BR /&gt;&lt;STRONG&gt;AutoNumberHash128("Date"&amp;amp;Dept) as Key,&lt;/STRONG&gt;&lt;BR /&gt;Dept&lt;BR /&gt;FROM [lib://Data/trend.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;Calendar:&lt;BR /&gt;LOAD&lt;/P&gt;&lt;P&gt;Date(MinDate + IterNo() -1,'DD/MM/YYYY') as Date,&lt;BR /&gt;WeekEnd(date(MinDate + IterNo() -1,'DD/MM/YYYY')) as Weekend,&lt;BR /&gt;Date(MinDate + IterNo() -1,'YYYY') as Year,&lt;BR /&gt;Date(MinDate + IterNo() -1,'MM/YY') as Month,&lt;BR /&gt;Date(MinDate + IterNo() -1,'YY') &amp;amp; '_' &amp;amp; Num(Week(MinDate + IterNo() -1),'00') as Week&lt;/P&gt;&lt;P&gt;While&lt;BR /&gt;MinDate + IterNo() -1 &amp;lt;=MaxDate;&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt;min(Date) as MinDate,&lt;BR /&gt;Floor(Today()) as MaxDate&lt;BR /&gt;//max(Date) as MaxDate&lt;/P&gt;&lt;P&gt;Resident Data;&lt;/P&gt;&lt;P&gt;Dates_Dept_T1:&lt;BR /&gt;Load Date&lt;BR /&gt;Resident Calendar;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Left Join(Dates_Dept_T1) // Add here other dimensions for which you want it to work&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Load Dept&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Resident Data;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Dates_Dept_T2:&lt;BR /&gt;Load *, &lt;STRONG&gt;AutoNumberHash128("Date"&amp;amp;Dept) as Key2&lt;/STRONG&gt;&lt;BR /&gt;Resident Dates_Dept_T1;&lt;/P&gt;&lt;P&gt;Drop Table Dates_Dept_T1;&lt;/P&gt;&lt;P&gt;Concatenate(Data)&lt;BR /&gt;Load *&lt;BR /&gt;Resident Dates_Dept_T2&lt;BR /&gt;where not Exists(Key,Key2);&lt;/P&gt;&lt;P&gt;Drop Table Dates_Dept_T2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below expression then just works for me with or without selection of Dept&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;sum({&amp;lt;Weekend&amp;gt;}aggr({&amp;lt;Weekend&amp;gt;} if(count({&amp;lt;Weekend&amp;gt;}ID)&amp;gt;0,count({&amp;lt;Status={'Open'},Weekend&amp;gt;}ID),
above(total column(1))),(Weekend, (NUMERIC, ASCENDING))))* avg(1)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2020 14:07:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weekend-counts/m-p/1728749#M723517</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-07-17T14:07:30Z</dc:date>
    </item>
  </channel>
</rss>

