<?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 Conditional Sum in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-Conditional-Sum/m-p/832691#M1012066</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good !!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Apr 2015 14:08:10 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-04-27T14:08:10Z</dc:date>
    <item>
      <title>Date Conditional Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Conditional-Sum/m-p/832684#M1012059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to set up a conditional expression that fulfills the following requirements:&lt;/P&gt;&lt;P&gt;-If today is a Monday, it will automatically sum up the total for the period Friday, Saturday and Sunday preceding.&lt;/P&gt;&lt;P&gt;-It is independent of all selections therefore {1} applies.&lt;/P&gt;&lt;P&gt;-If today is not a Monday, then it will just show the total for the previous day only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The conditional expression that I came up with is as follows:&lt;/P&gt;&lt;P&gt;if((Today=('Mon')),&lt;/P&gt;&lt;P&gt;&amp;nbsp; sum({1&amp;lt;Date={'&amp;gt;=$(=Only(Today())-3)&amp;lt;$(=Only(Today()))'}&amp;gt;}NoA),&lt;/P&gt;&lt;P&gt;&amp;nbsp; sum({1&amp;lt;Date={'$(=Date(Today()-1))'}&amp;gt;}NoA))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when the day is a Monday (i.e. today) this is still just calculating the sum for the day before, can someone please advise what is wrong with my expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that NoA is the fieldname of what I am trying to add up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for your kind help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Armend&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 11:26:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Conditional-Sum/m-p/832684#M1012059</guid>
      <dc:creator />
      <dc:date>2015-04-27T11:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: Date Conditional Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Conditional-Sum/m-p/832685#M1012060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(weekday(Today())='Mon',&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; sum({1&amp;lt;Date={'&amp;gt;=$(=Only(Today())-3)&amp;lt;$(=Only(Today()))'}&amp;gt;}NoA),&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;sum({1&amp;lt;Date={'$(=Date(Today()-1))'}&amp;gt;}NoA))&lt;/SPAN&gt;&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;BKC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 11:41:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Conditional-Sum/m-p/832685#M1012060</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-27T11:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: Date Conditional Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Conditional-Sum/m-p/832686#M1012061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ur if statement is wrong &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if((Today=('Mon'))&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;you need to use &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;if(weekday(Today())='Mon',&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Thanks &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;BKC&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 11:43:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Conditional-Sum/m-p/832686#M1012061</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-27T11:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Date Conditional Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Conditional-Sum/m-p/832687#M1012062</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;What I can see there is, in your SA, because you want to search your expression should be in double quote, I think your current expression is using single quote. And your weekday function as well needs changing to this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If((WeekDay(Today()) ='Mon',&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="color: #3d3d3d; font-family: 'Helvetica','sans-serif'; font-size: 10pt; mso-ansi-language: EN;"&gt;sum({1&amp;lt;Date={“&amp;gt;=$(=(Today())-3)&amp;lt;$(=(Today()))”}&amp;gt;}NoA),&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="color: #3d3d3d; font-family: 'Helvetica','sans-serif'; font-size: 10pt; mso-ansi-language: EN;"&gt;&amp;nbsp; sum({1&amp;lt;Date={“$(=Date(Today()-1))”}&amp;gt;}NoA))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 11:43:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Conditional-Sum/m-p/832687#M1012062</guid>
      <dc:creator>Gabriel</dc:creator>
      <dc:date>2015-04-27T11:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: Date Conditional Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Conditional-Sum/m-p/832688#M1012063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi BKC,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your response, however this is how my expression looked originally and what it does is that it calculates the total to date i.e. not just for the preceding three days but a sum of all records. I need it to add only the preceding three days if today's date is a Monday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any further advice 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;Armend &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 11:52:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Conditional-Sum/m-p/832688#M1012063</guid>
      <dc:creator />
      <dc:date>2015-04-27T11:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: Date Conditional Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Conditional-Sum/m-p/832689#M1012064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=If((WeekDay(Today()) ='Mon',&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background: white;"&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Helvetica, sans-serif;"&gt;sum({1&amp;lt;Date={“&amp;gt;=$(=(Today())-3)&amp;lt;$(=(Today()))”}&amp;gt;}NoA),&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background: white;"&gt;&lt;SPAN lang="EN" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Helvetica, sans-serif;"&gt;&amp;nbsp; sum({1&amp;lt;Date = {"&amp;lt;=$(=Today()) – 1)"}&amp;gt;}NoA))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 12:04:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Conditional-Sum/m-p/832689#M1012064</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-27T12:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: Date Conditional Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Conditional-Sum/m-p/832690#M1012065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks BKC,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I managed to figure out where my error was, please see amended statement which now works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(WeekDay(Today())='Mon',&lt;/P&gt;&lt;P&gt;&amp;nbsp; sum({1&amp;lt;Date={'&amp;gt;=$(=Date(Today()-3))&amp;lt;$(=Date(Today()))'}&amp;gt;}NoA),&lt;/P&gt;&lt;P&gt;&amp;nbsp; sum({1&amp;lt;Date={'$(=Date(Today()-1))'}&amp;gt;}NoA)&lt;/P&gt;&lt;P&gt;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your assistance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Armend&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 14:00:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Conditional-Sum/m-p/832690#M1012065</guid>
      <dc:creator />
      <dc:date>2015-04-27T14:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: Date Conditional Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Conditional-Sum/m-p/832691#M1012066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good !!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 14:08:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Conditional-Sum/m-p/832691#M1012066</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-27T14:08:10Z</dc:date>
    </item>
  </channel>
</rss>

