<?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(and formula in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-if-and-formula/m-p/40541#M790287</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Attached is a small sample&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Feb 2018 13:45:50 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-02-02T13:45:50Z</dc:date>
    <item>
      <title>Sum(if(and formula</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-if-and-formula/m-p/40536#M790282</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;This is driving me crazy. I'm trying to summarize all bookings that has the same month and year as the reload time with this formula; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(if(year([Booking date])=year(ReloadTime()) and month([Booking date])=month(ReloadTime()),[Net Sales LC]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However it returns 0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simon &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-if-and-formula/m-p/40536#M790282</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sum(if(and formula</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-if-and-formula/m-p/40537#M790283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you share some sample to look into?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2018 00:27:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-if-and-formula/m-p/40537#M790283</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2018-02-02T00:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: Sum(if(and formula</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-if-and-formula/m-p/40538#M790284</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;Yes, a very small sample attached. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2018 03:20:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-if-and-formula/m-p/40538#M790284</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-02T03:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: Sum(if(and formula</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-if-and-formula/m-p/40539#M790285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;At first look, I see bracket issues:&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(if(year([Booking date])=year(ReloadTime()&lt;SPAN style="text-decoration: line-through;"&gt;&lt;STRONG style="color: #ff0000; text-decoration: line-through;"&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt; and month([Booking date])=month(ReloadTime()&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="text-decoration: line-through;"&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;,[Net Sales LC]))&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;If this doesn't help, try to share more information about your issue and share a sample/screen shot may be.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2018 04:37:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-if-and-formula/m-p/40539#M790285</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2018-02-02T04:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Sum(if(and formula</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-if-and-formula/m-p/40540#M790286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please share sample data&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2018 05:42:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-if-and-formula/m-p/40540#M790286</guid>
      <dc:creator>shiveshsingh</dc:creator>
      <dc:date>2018-02-02T05:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: Sum(if(and formula</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-if-and-formula/m-p/40541#M790287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Attached is a small sample&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2018 13:45:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-if-and-formula/m-p/40541#M790287</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-02T13:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: Sum(if(and formula</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-if-and-formula/m-p/40542#M790288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you try this and let me know what you getting?.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SumSales:&lt;/P&gt;&lt;P&gt;LOAD *, Year([Booking date]) AS BookingYear, Month([Booking date]) AS BookingMonth,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(ReloadTime())&amp;nbsp;&amp;nbsp; AS ReloadYr, Month(ReloadTime()) AS ReloadMonth;&lt;/P&gt;&lt;P&gt;LOAD [Booking date],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Sold Units],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Net Sales LC]&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[..\Downloads\Sample.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is page);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change the excel path accordingly and run. By the way your data for booking date has January and when you do reloadtime which is going to be feb (which is current month and year) you will get all 0's. So i changed the Booking date values to Feb and ran the expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what i see when i run the expression.&lt;/P&gt;&lt;P&gt;= Sum(if(BookingYear = ReloadYr AND BookingMonth = ReloadMonth,[Net Sales LC]))&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="192371" alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/192371_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2018 17:10:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-if-and-formula/m-p/40542#M790288</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2018-02-02T17:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: Sum(if(and formula</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-if-and-formula/m-p/40543#M790289</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;Hi Simon,&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;Your expression looks good to me. There are 2 possibilities.&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;1)&amp;nbsp; [Booking date] field might be loaded as text format in Qlikview. So the year and month function returns nothing and your expression returns 0. So check the format of the [Booking Date] field and change it to date format (If it is not loaded as date format).&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;2) If you reload your application on Feb month and if there are no sales for the month of Feb then the net sales will be 0. So check whether is there any sales for the month of Feb or not.&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;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2018 19:30:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-if-and-formula/m-p/40543#M790289</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2018-02-02T19:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Sum(if(and formula</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-if-and-formula/m-p/40544#M790290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks - that worked! I also expanded it to weeks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Feb 2018 14:21:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-if-and-formula/m-p/40544#M790290</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-05T14:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Sum(if(and formula</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-if-and-formula/m-p/1649871#M790291</link>
      <description>&lt;P&gt;no bracket issues&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 02:56:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-if-and-formula/m-p/1649871#M790291</guid>
      <dc:creator>larara</dc:creator>
      <dc:date>2019-11-22T02:56:19Z</dc:date>
    </item>
  </channel>
</rss>

