<?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 statement with two conditions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/sum-statement-with-two-conditions/m-p/730990#M475997</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply. But this one seems not work. One of my concern is actually when multiple dates are selected. For example, when Year=2014, Month=01, Day=01,02,03,04,05, can I use makedate to display 01/01/2014,01/02/2014,01/03/2014, 01/04/2014,01/05/2014? If MakeDate does work, can I use OrderDate=Makedate(Year-1, num(Month), Day) to get the data when OrderDate=01/01/2013,01/02/2013,01/03/2013,01/04/2013, 01/05/2013? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gloria&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Jun 2014 17:27:33 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-06-23T17:27:33Z</dc:date>
    <item>
      <title>sum statement with two conditions</title>
      <link>https://community.qlik.com/t5/QlikView/sum-statement-with-two-conditions/m-p/730987#M475994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi There,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I successfully loaded a master calendar with Year, Month and Day which reflects order date. I want to find the total sales in previous year when currency code is USD. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression I am using is Sum({&amp;lt;[CurrencyCode]={'USD'},OrderDate={=MakeDate(Year-1,num(Month),Day)}&amp;gt;}Sale), but Qlikview returns me an error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody tell me what went wrong and how to fix it? Thanks so much!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gloria&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 16:44:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-statement-with-two-conditions/m-p/730987#M475994</guid>
      <dc:creator />
      <dc:date>2014-06-23T16:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: sum statement with two conditions</title>
      <link>https://community.qlik.com/t5/QlikView/sum-statement-with-two-conditions/m-p/730988#M475995</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 believe you need to use an expansion on the second condition.&amp;nbsp; Try somthing like this.&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;Sum({&amp;lt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [CurrencyCode]={'USD'}&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,OrderDate={$(=MakeDate(Year-1,num(Month),Day))&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;gt;}Sale)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 17:00:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-statement-with-two-conditions/m-p/730988#M475995</guid>
      <dc:creator>erikzions</dc:creator>
      <dc:date>2014-06-23T17:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: sum statement with two conditions</title>
      <link>https://community.qlik.com/t5/QlikView/sum-statement-with-two-conditions/m-p/730989#M475996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is your order date associated to master calendar?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px;"&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: 12.727272033691406px;"&gt;=sum( {$&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px;"&gt;[CurrencyCode]={USD},&lt;/SPAN&gt;Year={$(=max(Year)-1) }&amp;gt;}&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px;"&gt;Sale&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 17:25:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-statement-with-two-conditions/m-p/730989#M475996</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-06-23T17:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: sum statement with two conditions</title>
      <link>https://community.qlik.com/t5/QlikView/sum-statement-with-two-conditions/m-p/730990#M475997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply. But this one seems not work. One of my concern is actually when multiple dates are selected. For example, when Year=2014, Month=01, Day=01,02,03,04,05, can I use makedate to display 01/01/2014,01/02/2014,01/03/2014, 01/04/2014,01/05/2014? If MakeDate does work, can I use OrderDate=Makedate(Year-1, num(Month), Day) to get the data when OrderDate=01/01/2013,01/02/2013,01/03/2013,01/04/2013, 01/05/2013? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gloria&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 17:27:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-statement-with-two-conditions/m-p/730990#M475997</guid>
      <dc:creator />
      <dc:date>2014-06-23T17:27:33Z</dc:date>
    </item>
  </channel>
</rss>

