<?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: Sum IF, but from previous date with data in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754458#M268757</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;Hi,&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;&amp;nbsp; To solve these use set analysis&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;Simply create variable as:-&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;vMaxYear = max(Year)&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;vMaxMonth=max({&amp;lt;Year = {"$(vMaxYear)"}&amp;gt;}Month)&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;vPrevMonth =&amp;nbsp; month(addmonths(makedate($(vMaxYear), $(vMaxMonth)),-1))&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;vPrevYear = &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;Year(addmonths(makedate($(vMaxYear), $(vMaxMonth)),-1))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;Use above variables in expression using set analysis..&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;For Current Month selection&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;sum({&amp;lt;Year = {"$(vMaxYear)"},Month={"$(vMaxMonth)"}&amp;gt;}Amount)&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;for last month&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;sum({&amp;lt;Year = {"$(vPrevYear)"},Month={"$(vPrevMonth)"},Year=,Month=&amp;gt;}Amount)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;Regards,&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;Mukesh Chaudhari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Feb 2015 15:20:34 GMT</pubDate>
    <dc:creator>mukesh24</dc:creator>
    <dc:date>2015-02-19T15:20:34Z</dc:date>
    <item>
      <title>Sum IF, but from previous date with data</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754452#M268751</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;I need to sum like below but for the previous applicable date, any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;=&lt;SPAN style="color: #0000ff;"&gt;SUM&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;IF&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;T&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;ype&lt;/SPAN&gt;&lt;SPAN&gt;='XXXX',&lt;SPAN style="color: #800000;"&gt;A&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;mount&lt;/SPAN&gt;&lt;SPAN&gt;)) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 14:07:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754452#M268751</guid>
      <dc:creator />
      <dc:date>2015-02-19T14:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Sum IF, but from previous date with data</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754453#M268752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use set analysis. Try this...I would recommend create variable for previous date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;Type={XXX}, Date={$(=Max(Date)-1)}&amp;gt;}Amount)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 14:13:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754453#M268752</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-19T14:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: Sum IF, but from previous date with data</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754454#M268753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what if Date-1 does not have any data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Olle &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 15:00:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754454#M268753</guid>
      <dc:creator />
      <dc:date>2015-02-19T15:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: Sum IF, but from previous date with data</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754455#M268754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;qlikview will ignore the null values and sum all other values&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 15:06:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754455#M268754</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-19T15:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sum IF, but from previous date with data</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754456#M268755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why would you want to sum Date-1 if you won't have any data in it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 15:14:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754456#M268755</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-02-19T15:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: Sum IF, but from previous date with data</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754457#M268756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I dont.&lt;/P&gt;&lt;P&gt;For instance today is monday then I want Date-1 to sum up friday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Olle &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 15:20:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754457#M268756</guid>
      <dc:creator />
      <dc:date>2015-02-19T15:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: Sum IF, but from previous date with data</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754458#M268757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;Hi,&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;&amp;nbsp; To solve these use set analysis&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;Simply create variable as:-&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;vMaxYear = max(Year)&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;vMaxMonth=max({&amp;lt;Year = {"$(vMaxYear)"}&amp;gt;}Month)&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;vPrevMonth =&amp;nbsp; month(addmonths(makedate($(vMaxYear), $(vMaxMonth)),-1))&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;vPrevYear = &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;Year(addmonths(makedate($(vMaxYear), $(vMaxMonth)),-1))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;Use above variables in expression using set analysis..&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;For Current Month selection&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;sum({&amp;lt;Year = {"$(vMaxYear)"},Month={"$(vMaxMonth)"}&amp;gt;}Amount)&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;for last month&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;sum({&amp;lt;Year = {"$(vPrevYear)"},Month={"$(vPrevMonth)"},Year=,Month=&amp;gt;}Amount)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;Regards,&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;Mukesh Chaudhari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 15:20:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754458#M268757</guid>
      <dc:creator>mukesh24</dc:creator>
      <dc:date>2015-02-19T15:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: Sum IF, but from previous date with data</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754459#M268758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Getting zero values Im afriad.&lt;/P&gt;&lt;P&gt;Could it be something with my dates?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 15:22:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754459#M268758</guid>
      <dc:creator />
      <dc:date>2015-02-19T15:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: Sum IF, but from previous date with data</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754460#M268759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use a if statement in that case:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;vPreviousDate = If(WeekDay(Max(Date)) = 'Mon', Date(Max(Date) - 3), Date(Max(Date) -1)))&lt;/STRONG&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; font-size: 13px;"&gt;=Sum({&amp;lt;Type={XXX}, Date={'$(vPreviousDate)'}&amp;gt;} Amount)&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: 13px;"&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; font-size: 13px;"&gt;Best,&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: 13px;"&gt;S&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 15:24:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754460#M268759</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-02-19T15:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: Sum IF, but from previous date with data</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754461#M268760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hmm, that is a nice looking approach.&lt;/P&gt;&lt;P&gt;But how would I apply it to days rather than months and years?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Olle&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 15:25:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754461#M268760</guid>
      <dc:creator />
      <dc:date>2015-02-19T15:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Sum IF, but from previous date with data</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754462#M268761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Getting a Script line error when pasting the vPreviousDate into my script&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 15:30:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754462#M268761</guid>
      <dc:creator />
      <dc:date>2015-02-19T15:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: Sum IF, but from previous date with data</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754463#M268762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Olle:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am gonna attend a meeting. My friend SunIndia will try to help you on this if you have still not got the right answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 15:31:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754463#M268762</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-19T15:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Sum IF, but from previous date with data</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754464#M268763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pasting it in the script? Just add to the variables in the front end using the variable overview&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/78557_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 15:31:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754464#M268763</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-02-19T15:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Sum IF, but from previous date with data</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754465#M268764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;simply create additional day variable same as month...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 16:35:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754465#M268764</guid>
      <dc:creator>mukesh24</dc:creator>
      <dc:date>2015-02-19T16:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: Sum IF, but from previous date with data</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754466#M268765</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;For some reason I cannot get the variable to work properly when adding it into the Variable Overview. Same if I SET it in the script. However the if-function works properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So now I've got the below two working formulas, how do I put them together? My set analysis skills are poor, I never seem to learn the syntaxes &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/confused.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;TODAYS&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;=&lt;SPAN style="color: #0000ff;"&gt;SUM&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;IF&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;TYPE&lt;/SPAN&gt;='XXX',&lt;SPAN style="color: #800000;"&gt;AMOUNT&lt;/SPAN&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;BUT NEED TO USE YESTERDAYS DATE&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;IF&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;WeekDay&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Max&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;)) = 'Mon', &lt;SPAN style="color: #0000ff;"&gt;Date&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Max&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;) - 3), &lt;SPAN style="color: #0000ff;"&gt;Date&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Max&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;) -1)) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 09:19:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754466#M268765</guid>
      <dc:creator />
      <dc:date>2015-02-20T09:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: Sum IF, but from previous date with data</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754467#M268766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please find the attachment for further clarification&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;vPreviousDateTypeXYZ =If(WeekDay(Max({&amp;lt;Type = {'XYZ'}&amp;gt;}Date)) = 'Mon', Date(Max({&amp;lt;Type = {'XYZ'}&amp;gt;}Date) - 3), Date(Max({&amp;lt;Type = {'XYZ'}&amp;gt;}Date) -1))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="font-size: 13.3333330154419px;"&gt;vPreviousDateTypZZZ =If(WeekDay(Max({&amp;lt;Type = {'ZZZ'}&amp;gt;}Date)) = 'Mon', Date(Max({&amp;lt;Type = {'ZZZ'}&amp;gt;}Date) - 3), Date(Max({&amp;lt;Type = {'ZZZ'}&amp;gt;}Date) -1))&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Text Box Expression: &lt;STRONG&gt;=Sum({&amp;lt;Type={'XYZ'}, Date={'$(vPreviousDateTypeXYZ)'}&amp;gt;} Amount)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="font-size: 13.3333330154419px;"&gt;=Sum({&amp;lt;Type={'XYZ'}, Date={'$(vPreviousDateTypeZZZ)'}&amp;gt;} Amount)&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here Type XYZ has a max date of 02/16/2015 (which was a Monday) so it picks the value from Friday and type ZZZ has a max date of 02/17/2015 (which was a Tuesday) so it picks the value from Monday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 11:23:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754467#M268766</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-02-20T11:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: Sum IF, but from previous date with data</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754468#M268767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Olle,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this one, it will sums up the amount for the max possible date before today: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Type = {'XXX'}, Date = {"$(=Max({&amp;lt;Date={`&amp;lt;$(=Today())`}&amp;gt;}Date))"}&amp;gt;}AMOUNT)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 12:23:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754468#M268767</guid>
      <dc:creator>daveamz</dc:creator>
      <dc:date>2015-02-20T12:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: Sum IF, but from previous date with data</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754469#M268768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your answer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;still cannot apply to mp app.&lt;/P&gt;&lt;P&gt;Im clearly missing out on something,&lt;/P&gt;&lt;P&gt;here comes an example file, any clue why im getting zero values?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//O&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 12:44:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754469#M268768</guid>
      <dc:creator />
      <dc:date>2015-02-20T12:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Sum IF, but from previous date with data</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754470#M268769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you looking to put that number across all possible dates??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/78652_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is what you are looking to do, then use this expression:&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;Pmt_Subtype={'Credit line connected payment'}, Date={'$(vPreviousDate)'}&amp;gt;} &lt;STRONG&gt;TOTAL&lt;/STRONG&gt; Pmt_amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 13:14:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754470#M268769</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-02-20T13:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Sum IF, but from previous date with data</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754471#M268770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im expecting vPreviousDate to show the previos date for each row,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For instance:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;Red row&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;vPreviousDate should equal &lt;STRONG&gt;2014/12/11&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Sum PreviousDate should equal &lt;STRONG&gt;-1,009,973,010&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Blue&lt;/STRONG&gt;&lt;/SPAN&gt; row&lt;/P&gt;&lt;P&gt;vPreviousDate should equal &lt;STRONG&gt;2014/12/12&lt;/STRONG&gt; (since there's a weekend in between)&lt;/P&gt;&lt;P&gt;Sum PreviousDate should equal&lt;STRONG&gt; 2,858,915,949&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/78666_Capture.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 13:29:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-IF-but-from-previous-date-with-data/m-p/754471#M268770</guid>
      <dc:creator />
      <dc:date>2015-02-20T13:29:21Z</dc:date>
    </item>
  </channel>
</rss>

