<?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: Date Equal to Weekend Date in Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-Equal-to-Weekend-Date-in-Set-Analysis/m-p/359208#M495366</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you both for the help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Swuehl--your expression is what I was looking for. I was previously close to that answer; however, I was using WeekEnd(POSDate)+5, which wasn't working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mayil--I tried both of your expressions. The first one (when looked at in a straight table) was returning all the days of the week (I'm not sure why). The second one returned nothing. Thank you for your help anyhow. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Jul 2012 18:25:39 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-07-19T18:25:39Z</dc:date>
    <item>
      <title>Date Equal to Weekend Date in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Equal-to-Weekend-Date-in-Set-Analysis/m-p/359205#M495363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to include the condition POS date equal to Friday in the following expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avg(Aggr(Sum({$&amp;lt;CCYTD={1}&amp;gt;}OnHandDol),POSDate))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried to get this to work a number of different ways including:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;using an if condition in the expression&lt;/LI&gt;&lt;LI&gt;using multiple different syntax forms of POSDate = Weekend(POSDate) &lt;/LI&gt;&lt;LI&gt;using an if condition before the expression&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;each of these returns either the wrong value or nothing at all. Any idea of how to get this expression to work correctly? Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ben D. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2012 16:45:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Equal-to-Weekend-Date-in-Set-Analysis/m-p/359205#M495363</guid>
      <dc:creator />
      <dc:date>2012-07-19T16:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: Date Equal to Weekend Date in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Equal-to-Weekend-Date-in-Set-Analysis/m-p/359206#M495364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use weekday(DATEFIELD) to get the weekday, Friday equals to 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So try a set expression like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Avg(Aggr(Sum({$&amp;lt;CCYTD={1}, POSDate = {"=weekday(POSDate)=4"}&amp;gt;} OnHandDol),POSDate))&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2012 16:57:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Equal-to-Weekend-Date-in-Set-Analysis/m-p/359206#M495364</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-07-19T16:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: Date Equal to Weekend Date in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Equal-to-Weekend-Date-in-Set-Analysis/m-p/359207#M495365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =WeekEnd(Today(),0,-2) gives friday day..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Avg(Aggr(Sum({$&amp;lt;CCYTD={1},PosDate={$(WeekEnd(PosDate,0,-2))}&amp;gt;}OnHandDol),POSDate))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; or&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(PosDate = WeekEnd(PosDate,0,-2),Avg(Aggr(Sum({$&amp;lt;CCYTD={1}&amp;gt;}OnHandDol),POSDate)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2012 17:03:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Equal-to-Weekend-Date-in-Set-Analysis/m-p/359207#M495365</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-07-19T17:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: Date Equal to Weekend Date in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Equal-to-Weekend-Date-in-Set-Analysis/m-p/359208#M495366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you both for the help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Swuehl--your expression is what I was looking for. I was previously close to that answer; however, I was using WeekEnd(POSDate)+5, which wasn't working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mayil--I tried both of your expressions. The first one (when looked at in a straight table) was returning all the days of the week (I'm not sure why). The second one returned nothing. Thank you for your help anyhow. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2012 18:25:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Equal-to-Weekend-Date-in-Set-Analysis/m-p/359208#M495366</guid>
      <dc:creator />
      <dc:date>2012-07-19T18:25:39Z</dc:date>
    </item>
  </channel>
</rss>

