<?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: How to exclude weekends from expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-exclude-weekends-from-expression/m-p/578698#M215193</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;Sum(if(Period =&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;IF(WeekDay(&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em; color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;$(vMaxDate)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;-30)='Sat',Date(&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em; color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;$(vMaxDate)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;-31),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(WeekDay(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;$(vMaxDate)&lt;/SPAN&gt;-30)='Sun',Date(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;$(vMaxDate)&lt;/SPAN&gt;-32),Date(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;$(vMaxDate)&lt;/SPAN&gt;)))&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt; and Period = $(VMaxDate) and File_Type = 'Container',Metric_Value))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Apr 2014 09:51:44 GMT</pubDate>
    <dc:creator>MK_QSL</dc:creator>
    <dc:date>2014-04-15T09:51:44Z</dc:date>
    <item>
      <title>How to exclude weekends from expression</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-exclude-weekends-from-expression/m-p/578697#M215192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an expression where i want to exclued the weekend date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg: I am have a field as Date and variable vMaxDatee = max(Date) = 07-Apr-2014 and&lt;/P&gt;&lt;P&gt;Variable = vLastMonth = max(Date)-30 = 08-Mar-2014.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;08-Mar-2014 is a saturady so my Variable should get Date as 07-Mar-2014.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Current expression is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(if(Period = $(vMaxDate)-30 and Period = $(VMaxDate) and File_Type = 'Container',Metric_Value))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to give $(vMaxDate)-30 value if comes to day as saturady or sunday it should provide me date of Friday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody please help its urgent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regardrs,&lt;/P&gt;&lt;P&gt;Pranav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2014 09:44:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-exclude-weekends-from-expression/m-p/578697#M215192</guid>
      <dc:creator />
      <dc:date>2014-04-15T09:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude weekends from expression</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-exclude-weekends-from-expression/m-p/578698#M215193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;Sum(if(Period =&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;IF(WeekDay(&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em; color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;$(vMaxDate)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;-30)='Sat',Date(&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em; color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;$(vMaxDate)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;-31),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(WeekDay(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;$(vMaxDate)&lt;/SPAN&gt;-30)='Sun',Date(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;$(vMaxDate)&lt;/SPAN&gt;-32),Date(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;$(vMaxDate)&lt;/SPAN&gt;)))&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt; and Period = $(VMaxDate) and File_Type = 'Container',Metric_Value))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2014 09:51:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-exclude-weekends-from-expression/m-p/578698#M215193</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-04-15T09:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude weekends from expression</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-exclude-weekends-from-expression/m-p/578699#M215194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Update please check now&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If in load script you add another field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=WeekDay( Period ) then you get Sun,Mon,Tue,Wed,Thu,Fri,Sat then in expression use like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try like&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum( {&amp;lt; Period = {'Mon','Tue','Wed','Thu','Fri'}, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;File_Type = { 'Container'&lt;/SPAN&gt; } &amp;gt;} Metric_Value)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2014 09:53:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-exclude-weekends-from-expression/m-p/578699#M215194</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-04-15T09:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude weekends from expression</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-exclude-weekends-from-expression/m-p/578700#M215195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use&lt;/P&gt;&lt;P&gt;vLastMonth=firstworkdate(max(Date)-30),1)&lt;/P&gt;&lt;P&gt;it gives you the last workday before your "Date", so instead of saturday you get friday&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2014 09:55:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-exclude-weekends-from-expression/m-p/578700#M215195</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-15T09:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude weekends from expression</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-exclude-weekends-from-expression/m-p/578701#M215196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;"I want to give $(vMaxDate)-30 value if comes to day as saturady or sunday it should provide me date of Friday."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;In your load add to your master calendar:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;if(weekday(yourdate) &amp;gt; 5, 4, weekday(yourdate)) as workingdays.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;This will give you for saturday (5) and sunday (6) the friday (4) or else 0 to 3 for mon to thu. This way the values from sat and sun will be counted on friday, if that is what you need.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add workingdays to your chart as dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please keep in mind (quote help text):&lt;/P&gt;&lt;P class="syntax"&gt;&lt;A name="kanchor472"&gt;&lt;/A&gt;&lt;EM&gt;If the date format used does not correspond to the one set in your operating system, QlikView will not be able to make a correct interpretation. &lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2014 10:01:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-exclude-weekends-from-expression/m-p/578701#M215196</guid>
      <dc:creator>Michiel_QV_Fan</dc:creator>
      <dc:date>2014-04-15T10:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude weekends from expression</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-exclude-weekends-from-expression/m-p/578702#M215197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rudolf,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried your suggestion and placed the Variable inside my expression but then also it didnt worked.&lt;/P&gt;&lt;P&gt;Let me give you my original expression for your refrence.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if any changes are required in the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Original expression:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;AsOFPeriod = {'&amp;gt;$(=date($(vMaxDate)-30)) &amp;lt;=$(=date($(vMaxDate)))'},&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Last ={'last_30'},&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;File_Type = { 'Container'&lt;/SPAN&gt; }, Auto_Number={'1'} &amp;gt;} Metric_Value) /1000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i try to create a variable as vLastMonth =firstworkdate(max(Date)-30),1) or any other formula nd place it in expression it is not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pranav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2014 08:07:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-exclude-weekends-from-expression/m-p/578702#M215197</guid>
      <dc:creator />
      <dc:date>2014-04-16T08:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude weekends from expression</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-exclude-weekends-from-expression/m-p/578703#M215198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tab1:&lt;/P&gt;&lt;P&gt;Load *&amp;nbsp; Inline[&lt;/P&gt;&lt;P&gt;DayExcludedweekends&lt;/P&gt;&lt;P&gt;Mon&lt;/P&gt;&lt;P&gt;Tues&lt;/P&gt;&lt;P&gt;Wed&lt;/P&gt;&lt;P&gt;Thus&lt;/P&gt;&lt;P&gt;Fri&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left join(Tab1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load*,&lt;/P&gt;&lt;P&gt;Weeday(Date) as Day&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from path&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and use&amp;nbsp; what you are using in variable and expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2014 08:24:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-exclude-weekends-from-expression/m-p/578703#M215198</guid>
      <dc:creator>SunilChauhan</dc:creator>
      <dc:date>2014-04-16T08:24:51Z</dc:date>
    </item>
  </channel>
</rss>

