<?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: Exclude Weekends from Straight table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654939#M448136</link>
    <description>&lt;P&gt;add to your script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if(num(weekday([Request_Date]))&amp;lt;5, 0,1) as FLAG_IS_WEEKEND&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then you can use:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=Count({&amp;lt;Activity_or_Demand={'Demand'},[Request_Date] = {"$(=Date(Today()-5))"}, FLAG_IS_WEEKEND = {"0"}&amp;gt;}Event_Key)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sorry my first approach will not work in set analysis.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;num(weekday([Request_Date])) &amp;lt; {"5"}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;regards&lt;/P&gt;&lt;P&gt;tim&lt;/P&gt;</description>
    <pubDate>Fri, 06 Dec 2019 10:51:30 GMT</pubDate>
    <dc:creator>zhadrakas</dc:creator>
    <dc:date>2019-12-06T10:51:30Z</dc:date>
    <item>
      <title>Exclude Weekends from Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654908#M448130</link>
      <description>&lt;P&gt;Hi guys - how can I produce a straight table, based on the following set analysis.&amp;nbsp; I want to show the total count of our demand, based on request date, over the past 5 days (in one column), past 4 days (in one column), past 3 days(in one column), past 2 days (in one column) and yesterday (in one column).&amp;nbsp; I've sorted the individual columns as per following set analysis per column expression:&lt;/P&gt;&lt;P&gt;=Count({&amp;lt;Activity_or_Demand={'Demand'},[Request_Date] = {"$(=Date(Today()-5))"}&amp;gt;}Event_Key)&lt;/P&gt;&lt;P&gt;=Count({&amp;lt;Activity_or_Demand={'Demand'},[Request_Date] = {"$(=Date(Today()-4))"}&amp;gt;}Event_Key)&lt;/P&gt;&lt;P&gt;=Count({&amp;lt;Activity_or_Demand={'Demand'},[Request_Date] = {"$(=Date(Today()-3))"}&amp;gt;}Event_Key)&lt;/P&gt;&lt;P&gt;=Count({&amp;lt;Activity_or_Demand={'Demand'},[Request_Date] = {"$(=Date(Today()-2))"}&amp;gt;}Event_Key)&lt;/P&gt;&lt;P&gt;=Count({&amp;lt;Activity_or_Demand={'Demand'},[Request_Date] = {"$(=Date(Today()-1))"}&amp;gt;}Event_Key)&lt;/P&gt;&lt;P&gt;The problem I'm having is that the weekends are creeping into this based on the above set analysis and I would like to somehow exclude these from the straight table all together.&amp;nbsp; I only have 'Request Date' as the field referring to date and somehow need Qlikview to work out which is a Saturday or Sunday (on Request Date only) and exclude from the straight table.&lt;/P&gt;&lt;P&gt;If you think a straight table is the wrong way to approach this, I'd appreciate your advice guys.&amp;nbsp; Rgds&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 01:45:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654908#M448130</guid>
      <dc:creator>jlampard40</dc:creator>
      <dc:date>2024-11-16T01:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude Weekends from Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654913#M448131</link>
      <description>&lt;P&gt;easiest way is to add this to your expression:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;num(weekday([Request_Date])) &amp;lt; {"5"}&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;best way would be to add a flag on script side called FLAG_IS_WEEKEND&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;where monday-friday have 0, saturday and sunday have 1 . then you could do it like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;FLAG_IS_WEEKEND = {"0"}&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;tim&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2019 10:08:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654913#M448131</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2019-12-06T10:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude Weekends from Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654915#M448132</link>
      <description>&lt;P&gt;I can give one, remain manage your self&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WeekDay(Request_Date) as WeekDay&lt;/STRONG&gt; // Create this as field from script&lt;/P&gt;&lt;P&gt;And use expression as&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Count({&amp;lt;Activity_or_Demand={'Demand'}&lt;FONT color="#FF0000"&gt;&amp;gt;*&amp;lt;&lt;/FONT&gt;[Request_Date] = {"$(=Date(Today()-5))"}&amp;gt;&lt;FONT color="#FF0000"&gt;*&amp;lt;Request_Date-={'Sat', 'Sun'}&lt;/FONT&gt;&amp;gt;}Event_Key)&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2019 10:09:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654915#M448132</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2019-12-06T10:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude Weekends from Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654932#M448134</link>
      <description>&lt;P&gt;Can you show me how to include the 'FLAG_IS_WEEKEND' flag into script side?&amp;nbsp; Also, how do I incorporate the Num element into my set analysis?&amp;nbsp; Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2019 10:38:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654932#M448134</guid>
      <dc:creator>jlampard40</dc:creator>
      <dc:date>2019-12-06T10:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude Weekends from Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654939#M448136</link>
      <description>&lt;P&gt;add to your script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if(num(weekday([Request_Date]))&amp;lt;5, 0,1) as FLAG_IS_WEEKEND&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then you can use:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=Count({&amp;lt;Activity_or_Demand={'Demand'},[Request_Date] = {"$(=Date(Today()-5))"}, FLAG_IS_WEEKEND = {"0"}&amp;gt;}Event_Key)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sorry my first approach will not work in set analysis.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;num(weekday([Request_Date])) &amp;lt; {"5"}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;regards&lt;/P&gt;&lt;P&gt;tim&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2019 10:51:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654939#M448136</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2019-12-06T10:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude Weekends from Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654948#M448139</link>
      <description>&lt;P&gt;That works well -I get a '0' in the table where the weekend lies.&amp;nbsp; Next step - how can I write set analysis to now calculate the average per day, over the past 8 days EXCLUDING weekends.&amp;nbsp; Really appreciate your help.&amp;nbsp; Kind regards&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2019 11:03:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654948#M448139</guid>
      <dc:creator>jlampard40</dc:creator>
      <dc:date>2019-12-06T11:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude Weekends from Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654955#M448140</link>
      <description>&lt;P&gt;Perhaps something like&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Count({&amp;lt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; Activity_or_Demand={'Demand'},&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; [Request_Date] = {"$(=Date(Today()-5))"} &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;* P({&amp;lt;Request_Date = {"=Weekday(Request_Date)&amp;lt;=4"}&amp;gt;} Request_Date)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;gt;}Event_Key)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Although a better approach would be to create a work day flag associated with the Request_Date in your load script and use this flag in a simpler set expression.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2019 11:19:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654955#M448140</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2019-12-06T11:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude Weekends from Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654962#M448141</link>
      <description>&lt;P&gt;Thanks.&amp;nbsp; One last question.&amp;nbsp; In the columns which are identified as weekends, using the 'FLAG_AS_WEEKEND' - how can I change the background colour of these weekend cells to light grey so as to visually differentiate them in the table?&amp;nbsp; Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2019 11:26:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654962#M448141</guid>
      <dc:creator>jlampard40</dc:creator>
      <dc:date>2019-12-06T11:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude Weekends from Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654966#M448142</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bg_color.png" style="width: 714px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/25068i9288CCBAC32FBE75/image-size/large?v=v2&amp;amp;px=999" role="button" title="bg_color.png" alt="bg_color.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;put that expression there:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if(FLAG_IS_WEEKEND=1, LightGray())&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 06 Dec 2019 11:31:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654966#M448142</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2019-12-06T11:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude Weekends from Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654977#M448147</link>
      <description>&lt;P&gt;Thanks Zhadrakas but that doesn't want to work..?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2019 11:52:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654977#M448147</guid>
      <dc:creator>jlampard40</dc:creator>
      <dc:date>2019-12-06T11:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude Weekends from Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654978#M448148</link>
      <description>&lt;P&gt;i dont understand where you want to use that. in the above expression it wont work because you excluded the weekends cells!&lt;/P&gt;&lt;P&gt;is that a new object where you need to set the background colour?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2019 11:54:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654978#M448148</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2019-12-06T11:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude Weekends from Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654979#M448149</link>
      <description>&lt;P&gt;Jonty - how do I go about creating this 'workday' flag?&amp;nbsp; That sounds particularly useful.&amp;nbsp; Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2019 12:02:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654979#M448149</guid>
      <dc:creator>jlampard40</dc:creator>
      <dc:date>2019-12-06T12:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude Weekends from Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654982#M448151</link>
      <description>&lt;P&gt;OK - I get that.&amp;nbsp; Excluding the weekend counts has worked fine - I get the zero in the cell which is OK.&amp;nbsp; I just want to visually show on the table that these cells refer to a weekend somehow otherwise they may wonder why there is a zero count in the cells.&amp;nbsp; Rgds&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2019 12:07:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654982#M448151</guid>
      <dc:creator>jlampard40</dc:creator>
      <dc:date>2019-12-06T12:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude Weekends from Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654987#M448153</link>
      <description>&lt;P&gt;if the 0 is in the cell of the calculated expression, you should go the background color expression and try it like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if([EXPRESSION_NAME]=0, LightGray())&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2019 12:11:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654987#M448153</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2019-12-06T12:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude Weekends from Straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654991#M448156</link>
      <description>&lt;P&gt;That works!&amp;nbsp; Thank you Zhadrakas.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2019 12:21:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-Weekends-from-Straight-table/m-p/1654991#M448156</guid>
      <dc:creator>jlampard40</dc:creator>
      <dc:date>2019-12-06T12:21:09Z</dc:date>
    </item>
  </channel>
</rss>

